3

I want to add a swift package in my project. It appear in packages folder (by a drag n drop) but my project doesn't see it with "import myPackage", I've no such module error

Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
Smooki
  • 35
  • 1
  • 6

2 Answers2

3

1) Go to you project target -> general -> Frameworks, Libraries, and Embedded content
2) add package with + button. ( I only added testFramework on picture below just for example)

this image

Mr.SwiftOak
  • 1,469
  • 3
  • 8
  • 19
1

Use .package(path:) description in Package.swift.

You can add a dependency to a package located at the given path. And you can edit the package when debugging.

As PackageDescription mentioned this description:

The Swift Package Manager uses the package dependency as-is and does not perform any source control access. Local package dependencies are especially useful during the development of a new package or when working on multiple tightly coupled packages.

ahi
  • 730
  • 5
  • 8