Swift Package Manager Stuck in Loading State in Xcode 16

I’m having an issue with Xcode 16 where the Swift Package Manager is stuck in the "Searching All Sources" state. It only shows Apple Swift packages and is not listing any of third-party packages.

I’ve tried completely reinstalling Xcode, but the problem persists. Has anyone else encountered this issue? Any suggestions on how to resolve it?

Answered by Yokesh in 806544022

for me it is working now. cleared the recently viewed history and then searched with needed git library url then worked. sometimes it needs to reload to get the package in SPM. Thanks

I have the same issue.

Accepted Answer

for me it is working now. cleared the recently viewed history and then searched with needed git library url then worked. sometimes it needs to reload to get the package in SPM. Thanks

I can fix the issue by remove my GitHub account in account section and then add it.

@benmore1992 Thanks a lot! you saved my life, because I've been preparing coding interviews. wow.

If you're having trouble fetching a package, you may need to manually delete the SPM cache files located at: ~/Library/Caches/org.swift.swiftpm/ After that, update to the latest package versions.

Note: This will delete the clone history of all your SPM libraries, so re-cloning them takes some time. However, this should resolve my fetching issue.

Swift Package Manager Stuck in Loading State in Xcode 16
 
 
Q