Member-only story
How to add a swift package to iOS App using the Swift Package Manager
I’m going to show you how to add a swift package to your iOS app using the Swift Package Manager.
First how to add a package to your app
To add a package you will need a repository’s URL or if the package is hosted on GitHub or GitHub enterprise and you’re logged in you can just search for the package.
There’s actually two ways.
Here is way number 1:
- Navigate to the target’s general pane
- Click the
+
button in theFrameworks, Libraries, and Embedded Content
- Click on
Add Other
- Choose
Add Package Dependecy
Here is way number 2:
- Open the project
- Go to the File Menu
- Choose Swift Packages and enter the repo URL