8

Overview

  • I have a project that uses a remote swift package.
  • I would like to edit this package in the same project so that I can refine it based on the usage.

Aim:

  • To do this I am trying to add the same package as a local package so that I can edit it.

Reference:

https://developer.apple.com/documentation/swift_packages/editing_a_package_dependency_as_a_local_package

Problem:

  • When I drag and drop the cloned folder containing Package.swift into the project, I can't see any of the local package source files in the project. (see screenshot)

Xcode Project with Swift Package

I have been breaking my head over it. Any help on this would be much appreciated.

Xcode Version:

  • 13.2 (13C90) (downloaded from the developer portal not the AppStore)
user1046037
  • 16,755
  • 12
  • 92
  • 138

1 Answers1

10

The reason you cannot see the content of the package is that you have it open in another Xcode instance.

You can only edit a package in one Xcode instance at a time.

I find closing down Xcode completely, then opening up the particular project that I want to edit the package in solves the problem.

Andrew
  • 26,706
  • 9
  • 85
  • 101
  • 1
    Amazing!!, thanks a ton was breaking my head over it. I remember now that a similar thing happens even with frameworks as well – user1046037 Dec 14 '21 at 16:25