It's very frustrating that this has been a problem for so long.... I and everyone else on the iOS team at work has to run
git restore *.xcworkspace/xcshareddata/swiftpm/Package.resolved
every. single. time. we switch branches. Sometimes we accidentally commit the deletion of Package.resolved into git and it screws up our Xcode Cloud pipeline.
Any suggestions other than quitting & relaunching Xcode before & after switching branches? Has anyone had success with git hooks?
I switched to SPM to avoid versioning issues with cocoapods + xcode. Cocoapods is volunteer-driven and xcode can make any change they want, regardless of what cocoapods supports. I don't want that bringing my development to a screeching halt, so I choose SPM.
I miss the way that cocoapods works. My project is not a swift package. Why can't I define a Package.swift file (or something of the like) as the source of truth for the dependencies of my project, and just put Package.resolved in my .gitignore? Xcode could have the location of Package.swift as a setting in .pbxproj, and interpret when resolving dependencies. I get to decide when I want to update my package dependencies (xcodebuild spm install or xcodebuild spm update or something like that). Why not?? Am I missing something??