How to Install SPM Package
Swift Package Manager (SPM) is the native tool for managing Swift code distribution, integrated directly into Xcode.
Step 1: Open Package Settings
- Open your project in Xcode.
- Select your project in the Project Navigator (the blue icon at the top left).
- Select your project under the Project heading.
- Click on the Package Dependencies tab.
Step 2: Add a New Package
- Click the + (plus) button at the bottom of the list.
- In the search bar at the top right, paste the repository URL (e.g.,
https://github.com/SocialMobikul/BagistoNative_iOS). - Choose the Dependency Rule:
- Up to Next Major Version: Get the latest bug fixes and features.
- Branch: Targeted for specific development branches.
- Exact Version: Stick to one specific release.
Step 3: Select Targets
- Xcode will fetch the package.
- Select the library/module you want to add to your app target.
- Click Add Package.
Step 4: Verify
The package should now appear in the Package Dependencies section of the Project Navigator.
