How to add a local Swift Package in XCode
A step by step guide on adding a local Swift Package through the Swift Package Manager in XCode.
The following tutorial is based off the process that we carried out as part of our GraphQL Swift tutorial which uses a Local Package to allow you to make GraphQL API calls.
Step One: Add a New Package
Navigate to the Package Dependencies of your project and click +.
Step Two: Add Local Package
In the modal that appears, select Add Local...
Step Three: Select Local Folder
In the modal that appears, navigate to the location of the folder of the local package.
Select it and click Add Package.
Step Four: Confirm
In the confirmation modal that appears, click Add Package.
The local package will now be added to the projects package dependencies.
Looking to learn more about things you can do with Swift or XCode ?
Search our blog to find educational content on learning how to use Swift or XCode.