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
Asked
Active
Viewed 2,644 times
2 Answers
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)

Mr.SwiftOak
- 1,469
- 3
- 8
- 19
-
After this manipulation, my package (it's mine) appear only in the folder but not where you draw the circle – Smooki Jun 28 '22 at 13:19
-
You need to add it there by clicking the + button and chosing the package from selection – Mr.SwiftOak Jun 29 '22 at 15:02
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