Integrating the SDK

Follow the below steps to integrate with our iOS mobile SDK:

Add the iOS SDK to your Application

You can add the iOS SDK in two ways:

  • Git Hub: The iOS SDK is available in Git Hub. There is also a sample application available for your reference.
  • Cocoapod: The iOS SDK is published and available as Cocoapod to simplify the process of integration.

Requirements

  • iOS 10.0+ / macOS 10.15+

  • Xcode 11+

  • Swift 5+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For more information on usage and installation instructions, visit their website. CocoaPods is the recommended way of integrating our iOS SDK. It allows you to easily keep your application's dependencies up to date.

After installation, you need to set up pods for your application.

  1. Open the terminal and navigate to the application folder.
  2. Create an empty Podfile.

    $ touch podfile

  3. Open the Podfile.

    $ open -a xcode podfile

  4. Add the Paysafe iOS SDK pod to your Podfile. You can specify which version you want – if you do not mention a specific version, it will take the latest version of the SDK.

    pod 'Paysafe'

  5. Install the Paysafe iOS SDK pod in your application.

    $ pod install

Once the pod is installed in your application, you have to use workspace to use the installed SDK along with your application.

To integrate iOS Paysafe SDK into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Paysafe_SDK', '<latest_published_version>'

Usage

After installing the Paysafe_SDK cocoapod, import the SDK into your project.

@import Paysafe_SDK;
import Paysafe_SDK
Did you find this page useful?