If you're looking for information on how to integrate the SDK, check out our

Universal Checkout integration guide.

With CocoaPods

Add the following to your Podfile file:

12345678910
use_frameworks!
target 'MyApp' do
  # 👇 Add this line  pod 'PrimerSDK'
  # ...
end
ruby
copy

Then run 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.

123456789
post_install do |installer|  installer.pods_project.targets.each do |target|    if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"      target.build_configurations.each do |config|          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'      end    end  endend
ruby
copy

With Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into Xcode. In order to add PrimerSDK with Swift Package Manager:

  1. 1
    Select your project, and then navigate to Package Dependencies
  2. 2
    Click on the + button at the bottom-left of the Packages section
  3. 3
    Paste https://github.com/primer-io/primer-sdk-ios.git into the Search Bar, or search for primer-sdk-ios in the Search Bar.
  4. 4
    Press Add Package
  5. 5
    Let Xcode download the package and set everything up

For more details about SDK versions, please see our changelog.