I've created a new Swift Package to store all classes from an SDK I'm developing. The idea is to reuse that Swift Package between other projects.
I've added the package to my current Xcode project by right clicking on the Project Navigator on Xcode, clicking on Add Package Dependencies, clicking on "Add local...", and finally selecting the empty Swift Package that I had previously created.
So far so good.
I've then started moving classes from the project to the package and when I try to delete a file from the Swift Package I see that the Delete command is disabled.
Why is this so? How should I delete files from the Swift Package?
Should I be doing something different to have it enabled?
It seems like you have opened an Xcode project that has the SPM package as a dependency, and is trying to delete a file in the SPM package from the Xcode project. That is, you are selecting a file in the "Package Dependencies" section.
You should instead open the SPM package itself (File -> Open, then select the Package.swift file). Then you can delete its files. The "root" of the project navigator should be a package icon: