In order to cache the dependencies, they should be located in the project directory, but by default, SPM downloads the dependencies into the system folder: ~/Library/Developer/Xcode/DerivedData.
The Package. resolved file is inside your . xcodeproj directory at [appName].
The easiest option to add a Swift package is by entering the package URL in the search field in the top right. The package URL is the location where the Swift Package Manager can find the Package. swift file of the package, that is, the manifest of the package. For RxSwift, that simply means adding the GitHub URL.
You'll be able to manage your packages (add / remove)
Swift Package Manager(SPM) Dependency
Add dependency
1. Project Settings contains information about dependencies.
2. File -> Swift Packages -> Add Package Dependency...
3. Target -> General -> Frameworks, Libraries, and Embedded Content -> Add Items -> Add Other... -> Add Package Dependency...
Target Settings includes product from dependency
Edit dependency
To edit URL you can edit .pbxproj
with repositoryURL
Delete dependency
Project -> Packages -> <Select dependency> -> -
[Local Swift Package Manager(SPM)]
[iOS Dependency manager]
In addition to Pierre's answer, this was driving me crazy, I had a sub project that I was editing, I forgot about that (it was in a subfolder). Even though I removed it in the "Swift Packages" pane it kept coming back. Removing that sub folder reference made sure the PM dependencies went away.
I removed the swift package, but its dependancies were still showing in the project. I saw the swift package was still in the Frameworks folder at the bottom of left pane,
I removed it from there and the dependencies are gone.
Firstly I removed it from dependencies and targets in Package.swift, then i regenerated my project file with swift package generate-xcodeproj
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With