SPM loads indefinitely as seen below. I cannot add any packages.
Whether I enter a URL, or don’t enter a URL, this screen is loading forever.
Have tried deleting DerivedData folder (~/Library/Developer/Xcode/DerivedData) as well as SPM caches (~/Library/Caches/org.swift.swiftpm/), does not help.
Have made sure that I’ve committed my code to a git repository, and followed the advice here.
This is the first package I’m adding—I can’t add any packages, generally.
This problem exists for all my Xcode projects.
2
Answers
I had the same problem and was able to fix it by removing all my source control accounts under Xcode -> Setting -> Accounts and adding them back.
I faced the same problem in Xcode 16.1. This solution worked for me, but I need to repeat it every time I add a new Swift package (SPM):
plutil -remove IDESwiftPackageAdditionAssistantRecentlyUsedPackages ~/Library/Preferences/com.apple.dt.Xcode.plist