Search code examples
xcodeswift-package

Why is the *Delete* option grayed out for my package dependency in xcode?


Xcode version: 15.2 (15C500b)

I've looked around in various screens in Xcode but have not seen any way to delete a package dependency. Some StackOverflow posts mention the screen option Swift Packages but I can't find it in Xcode either.

Below is a screenshot showing the Delete option being grayed out

enter image description here


Solution

  • The Delete menu item is disabled because a Package has a complex integration with your project and must be deintegrated in good order. To do so, click the project at the top of the project navigator to edit it. On the right, make sure the project is selected, not a target. Across the top, find the Package Dependencies tab. Click it. You will see a list of dependencies. Select your package and hit the Minus button.

    enter image description here