xcodeswift-package-managerxcode11

How to delete Swift Package Dependency in Xcode 11?


I have a project in Xcode 11 that I added Swift Package Manager dependencies to. I now realized that I no longer need one of the package dependencies I previously added to my project.

As you can see below, there are no options under File > Swift Packages for deleting a packager from Swift Package Manager for this project.

Swift Packages Menu Options

I have tried removing the package from the array in the project.xcworkspace/xcshareddata/swiftpm/Package.resolved file. But it still doesn't remove it from Xcode, and the next time I Update to Latest Package Versions it readds the entry to the Package.resolved file.

How can I delete a Swift Package Manager dependency in my project?


Solution

    1. Open Xcode
    2. Select your project
    3. Look at the top middle
    4. Select Swift Package Manager menu

    You'll be able to manage your packages (add / remove)

    enter image description here