Editing a Package Dependency as a Local Package

Hi,

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)

Screenshot 2021-12-14 at 9.18.18 PM

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

Version

  • Xcode: 13.2 (13C90) (downloaded from the developer portal not the AppStore)

Problem was that I had the Swift Package file (SamplePackage.swift) opened in a different Xcode window.

Solution:

  • Close the swift package window SamplePackage.swift
  • Close and Open the SampleDemo project again and now the files show up
1 Like