swiftxcodeswift-package-manager

Local Swift Packages Stopped Working in Xcode 13


I've local Swift Packages added to a workspace. They reside in the project subfolders and connected to different git repositories as git submodules. Everything had been working perfectly (the project was able to build, packages were able to resolve, and I could edit the packages within the same workspace).

After I updated Xcode to 13.0, the project started failing to build with multiple errors Missing package product for each local package dependency. Removing derived data, resetting packages, cleaning build folder and restarting Xcode didn't help.


Solution

    1. Quit Xcode

    2. Open Terminal

    3. Navigate to the directory where your .xcodeproj is via Terminal (cd path/to/your/apps/folder)

    4. Run xcodebuild -resolvePackageDependencies

    5. After the packages finish resolving, open Xcode and try building again.