Search code examples
iosswiftswift-package-managerswift-package

Where is package.resolved stored?


Problem

  • I am using Swift Package in my project
  • I can't find package.resolved in the following path: [appName].xcodeproj/project.xcworkspace/xcshareddata/ (even tried showing the hidden files)

My findings:

  • Following path exists but is empty: [appName].xcodeproj/project.xcworkspace/xcshareddata/swiftpm doesn't contain .resolved file
  • [appName].xcodeproj/project.xcworkspace/xcshareddata/swiftpm/configuration is empty

Environment

  • macOS 13.0.1 (22A400)
  • Xcode Version 14.1 (14B47b)

Background

I wanted to check if package.resolved was checked it into git, but now I don't know where to find it.

Questions:

  • Where can I find Package.resolved file?
  • Or has this been changed to a different filename?

Solution

  • Problem

    For some reason the Package.resolved file was missing, not sure why.

    Workaround / Solution

    • Remove and add the Swift Package to the project, this caused the Package.resolved to be created