\n
all of my package are fetched but not resolved. This is a very big problem because in this condition I can't compile my app.\nThere's a way to fix this issue? There's someone who has the same problem like me?\nI'm getting crazy about this.\nThank you
\n","author":{"@type":"Person","name":"lucgian841"},"upvoteCount":14,"answerCount":9,"acceptedAnswer":{"@type":"Answer","text":"I just spent two days on this same issue, and finally got my rather long list of packages to resolve and build. I just can't believe Apple can't fix this. If we could just update one package at a time we could slowly get everything to work. In any case, I just made notes to my team of what I did to finally get all packages to resolve:
\nIf Xcode struggles to resolve them, the solution is complicated and must often be done multiple times (Xcode 13.2.1):
\nSome projects may not resolve or have errors (little red "x"s on the right side). Not good but may be solvable:
\nYou will probably get some warnings when running xcode build
, I get:
--- xcodebuild: WARNING: Using the first of multiple matching destinations:\n{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:xxx-xxx }\n{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }\n{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }\n...\n
\nOnce you get to a stable position, with no errors and all packages showing version numbers, you should be good for the long haul.
\nIMPORTANT: occasionally you need to update the minimum version shown in the Project -> Package Dependencies, to reflect the\nexisting Package release (which you may see from the left Xcode panel, or by visiting the Packages github site. If they are too\nold you may have problems resolving after you wipe the Derived Folder (for some other reason, maybe Package Format changed?)
\n
\n","author":{"@type":"Person","name":"David Hoerl"},"upvoteCount":27}}}Reputation: 2002
In my app I use several of SPM, I inserted them to my project. Yesterday I updated my Xcode to the last version (13.2.1), but I'm having lot of issues with SPM. Usually when I switch a branch or change a version of Xcode I clean all by using command+shift+k. I did the same with the new release of Xcode, but I'm having lots of issue by resolving SPM, as you can see in this image
all of my package are fetched but not resolved. This is a very big problem because in this condition I can't compile my app. There's a way to fix this issue? There's someone who has the same problem like me? I'm getting crazy about this. Thank you
Upvotes: 14
Views: 25277
Reputation: 140
I always face with this issue and solve it by resetting or resolving packages. Sometimes clearing derived data or reopening Xcode works just fine. However this time my issue didn't solved by these. The problem was a misconfigured swift package. After deleting the broken package, everything went back to normal.
So If solutions above not working, check your packages.
Upvotes: 0
Reputation: 7916
For me, the issue was that I had no longer a GitHub account under Settings > Accounts
.
Upvotes: 1
Reputation: 554
Was facing the similar issue with our custom frameworks.
Updating the swift tool version from // swift-tools-version:5.2
to // swift-tools-version:5.3
in the package.swift fixed the issue for me.
Upvotes: 0
Reputation: 5303
all warnings went away.
Upvotes: 0
Reputation: 77
For me I added the package anyway and then clicked on File > packages > Reset package caches
Upvotes: 2
Reputation: 849
What worked for me was following these steps in Xcode
Upvotes: 8
Reputation: 2242
For me,
Cmd + q
to totally quit XcodeUpvotes: 0
Reputation: 41652
I just spent two days on this same issue, and finally got my rather long list of packages to resolve and build. I just can't believe Apple can't fix this. If we could just update one package at a time we could slowly get everything to work. In any case, I just made notes to my team of what I did to finally get all packages to resolve:
If Xcode struggles to resolve them, the solution is complicated and must often be done multiple times (Xcode 13.2.1):
Some projects may not resolve or have errors (little red "x"s on the right side). Not good but may be solvable:
You will probably get some warnings when running xcode build
, I get:
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:xxx-xxx }
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
...
Once you get to a stable position, with no errors and all packages showing version numbers, you should be good for the long haul.
IMPORTANT: occasionally you need to update the minimum version shown in the Project -> Package Dependencies, to reflect the existing Package release (which you may see from the left Xcode panel, or by visiting the Packages github site. If they are too old you may have problems resolving after you wipe the Derived Folder (for some other reason, maybe Package Format changed?)
Upvotes: 27
Reputation: 193
These Steps work for me on XCode 13:
Also if you have errors on local packages, then just try to build them individually.
Hopefully it will help
Upvotes: 2