Add Swift Package in Xcode

Hi,

Overview

I would like to add a Swift Package to my Xcode project.

Problem

  • In Xcode when I select Project > Package Dependencies and Press + button to add a dependency it keeps spinning and doesn't end

Points to note:

  • Xcode 26.5 (17F42)
  • macOS 26.5 (25F71)
  • This is a private GitHub repository
  • I am able to clone the Swift Package URL on the command line.
  • Xcode has the GitHub account
  • I am able to push and pull code on that GitHub account using Xcode

My failed attempt

rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/org.swift.swiftpm
plutil -remove IDESwiftPackageAdditionAssistantRecentlyUsedPackages ~/Library/Preferences/com.apple.dt.Xcode.plist
  • I have removed GitHub account in Xcode and added it again

I am confused if I am missing something very obvious, any help on this is much appreciated.

Questions

  • Is there any workaround or way to fix this issue?
  • Why does this take such a long time when I have a specific URL, either it needs to add it or return that the package is not found. Why is it searching?
Add Swift Package in Xcode
 
 
Q