skip to Main Content

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.

enter image description here

2

Answers


  1. 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.

    Login or Signup to reply.
  2. 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):

    1. Close Xcode completely. Ensure it’s not running in the background.
    2. Open the Terminal and run the following command to remove cached Swift Package references: plutil -remove IDESwiftPackageAdditionAssistantRecentlyUsedPackages ~/Library/Preferences/com.apple.dt.Xcode.plist
    3. Reopen Xcode and your project. You should now be able to add a new Swift Package without any issues.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search