I have an Xcode project with a package dependency and want to add that package dependency locally for editing within my app project, but Xcode reports an error when trying to add the package locally.
Apple docs reference: Editing a package dependency as a local package
What I have tried:
I cloned that package dependency from github to a folder on my Mac.
I selected File/Add Package Dependencies... and then "Add Local...", selected the local folder with the cloned package to add it as a local package for editing to my Xcode project.
I expected Xcode to override my (remote) package dependency with the local package. But Xcode reports an error 'can not resolve package dependency graph...'.
If I select "Add Anyways" the local package is not added to the project.
With Xcode 15.2 I successfully added the cloned package as a local package for editing, by dragging and dropping the local package into my Xcode project right below the project name, instead of using File/Add Package Dependencies...
Xcode does override the (remote) package dependency. It shows this by removing the package dependency from the Project Navigator.
NOTE: the folder name of the folder that contains the local package needs to match the name of the package in the git repo for the drag and drop to be successful.
If you remove the local package again, the remote package dependency shows up again in the Project Navigator.