I’m working on a project and I’m using Swift package manager to manage dependencies. I had just updated my Xcode to 12.5 and I had deleted the derived data, because I thought it would resolve a problem I was having (none of the errors showing up on the Issue navigator, but would show up in the Report navigator). Anyways, that is not the main issue.
After I deleted my derived data, the package should have re-fetched. However, that is not happening. I tried resetting the package cache and restarting my macbook. This has been going on for two hours with me looking up similar questions on stack overflow, but I coudn’t find any solution.
Any help would be godsend.
Edit: Cloned the project in another directory to see if it would resolve the issue. No luck.
6
Answers
For anyone stuck in
fetching <package>
you might just needed to manually delete the cached files present in~/Library/Caches/org.swift.swiftpm/
Thanks to https://stackoverflow.com/a/67323117/3970488
Deleting cache only didn’t work for me.
I had to;
This solution is relevant to anybody encountering this issue on xCode v13.2.
According to Xcode 13.2 Release Notes, if you’re using Swift packages either standalone or as dependencies in an Xcode project or workspace, the Mac App Store version of Xcode fails during package resolution.
To solve this issue, you have to download Xcode 13.2 directly from the Apple Developer website. This would solve the problem.
More info can be found on this github issue.
Go to the left, to the packages and dependencies area, in the file managerenter image description here
This worked for me
If nothing above is working for you, then you its probably authentication problem, try adding to Accounts your GitHub account.
Xcode->Settings->Accounts