Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 13.1 bug editing dependency as local

Just upgraded to Xcode 13.1 and opened a SPM project by clicking the Package.swift file that has some dependencies. In the former versions I could simply edit one of these dependencies by dragging a local clone of the package into the Project Navigator. Xcode was then going to ignore the checked out dependency and let me edit the local one. Apple documents this here.

When trying this with Xcode 13.1, Xcode just copies the folder into the project folder, like it does with normal files/folders that are not SPM projects.

Did I find a bug or missed I something?

Thanks!

Update: I found out how to work around by creating a .xcodeproj file with swift package generate-xcodeproj. There I could drag in the package as always. This works but is not the way to go, as the xcodeproj generation is deprecated by apple.

like image 819
Michael_mhr Avatar asked Oct 15 '25 20:10

Michael_mhr


1 Answers

It looks like there is now an Add Local... button at the bottom of the add package wizard. Selecting the package from your local filesystem yields the same result as the "drag from finder" instructions you've linked.

The wizard is accessible from:

  • File > Add Packages, or
  • Project.xcodeproj > Package Dependencies > +.
like image 104
dcow Avatar answered Oct 18 '25 14:10

dcow



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!