If you’re looking for information on how to integrate the SDK, check out our
Universal Checkout integration guide.
CocoaPods Trunk stops accepting new versions on 2 December 2026. We recommend Swift Package Manager. If your app uses CocoaPods, follow Migrate from CocoaPods to Swift Package Manager.
With Swift Package Manager
Swift Package Manager is built into Xcode. To add PrimerSDK with Swift Package Manager:- Select your project, and then navigate to
Package Dependencies - Click on the + button at the bottom-left of the
Packagessection - Paste
https://github.com/primer-io/primer-sdk-iosinto the Search Bar - Press Add Package
- Let Xcode download the package and set everything up
Primer3DS). You don’t add it separately.
Payment method libraries
Klarna, NOL Pay, ACH via Stripe and iPay88 need a separate Primer library. Swift Package Manager cannot make a library optional. So PrimerSDK has a separate version for each library, and that version adds the library for you. To add a library, set the dependency rule to Exact Version. Enter your PrimerSDK version followed by the suffix for the library:
For example, for Klarna with PrimerSDK 2.53.1, enter
2.53.1-3ds-klarna. The -3ds-nolpay, -3ds-stripe and -3ds-ipay88 versions exist from PrimerSDK 2.54.0.
- Don’t add the library as a separate package. The version with the suffix already includes it, and adding both is unreliable.
- Always use Exact Version. With Up to Next Major Version, Swift Package Manager picks the version without the library.
- When you update PrimerSDK, change the version by hand. Keep the same suffix.
- Each version includes one library. No version includes two.
With CocoaPods (deprecated)
Add the following to yourPodfile file:
RUBY
Keep both
source lines at the top of your Podfile, in this order. CocoaPods Trunk accepts no new versions from 2 December 2026, so Primer publishes new versions to its own spec repo. CocoaPods takes a pod from the first source that has it, so the Primer line comes first. Once a Podfile has a source line, CocoaPods no longer adds its CDN by itself. The CDN line keeps your other pods installing. Older Primer versions are in both sources, so pod install can print Found multiple specifications for Primer pods. This is expected. CocoaPods uses the Primer spec repo, because it comes first.pod install to install PrimerSDK on your workspace.
In case you encounter an error that the bundle needs signing on Xcode 14, add the following post-install script in your podfile.
RUBY
For more details about SDK versions, please see our
changelog.