Managing SwiftPM dependencies from Xcode

How do you update the targets, change the branch, or delete a SwiftPM dependency in Xcode.

I can only find add and update in the Xcode UI.

My only solution is reverting my Xcode project and re-adding the repo with the settings that I want to change.

Is there a better way?

If your top level project is an xcodeproj, you can do this by selecting the project itself, and in the project view there is a “Packages” tab.

If your top level project is a SwiftPM package, simply edit the Package.swift directly: Xcode will pick up the changes.

Thanks, my top level project is an xcodeproject and I don't see a "Packages" tab (Xcode 11 beta 2).

I haven't yet figured out how to make SwiftPM projects run iOS apps, instead of mac apps, other than using the Xcode integration to integrate Swift PM library targets into an existing iOS Xcode project app.

Which is the better path forward and any recommended references?

04%20PM

It should be in the content view on the right hand side.

1 Like

Found it. Thanks!

Terms of Service

Privacy Policy

Cookie Policy