Setup With CocoaPods

The Olo Pay SDK supports the CocoaPods dependency management system. For more information about CocoaPods and how it works, refer to the CocoaPods Guides. This guide will walk through adding the Olo Pay SDK to your app using CocoaPods.

Important

If you have manually added the Olo Pay SDK as a dependency to your project and are now switching to using CocoaPods, please manually remove all Olo Pay and Stripe dependencies from your project and then follow the First Time Setup instructions

First Time Setup

  1. Install CocoaPods
  2. Create development and production targets for your app (if you don’t have them already)
  3. For each target in your Podfile, add the Olo Pay SDK using the tag of the desired Olo Pay SDK release:

    pod 'OloPaySDK', :git => "https://git@github.com/ololabs/olo-pay-ios-sdk-releases.git", :tag => 'X.Y.Z'

    Important

    Don’t forget to replace X.Y.Z with an actual version number (e.g. “4.0.0”). Visit our github releases page to see all available releases

    Additionally, older versions of the SDK had release tags prefixed with v. This prefix was dropped in v4.0.1 to support Swift Package Manager

  4. Run the following command to install the Olo Pay SDK pod

    pod install

  5. Open the workspace generated (or modified) by CocoaPods and begin using the Olo Pay SDK

SDK Updates

  1. Update the Olo Pay SDK version in your Podfile
  2. Run the following command toupdate the Olo Pay SDK pod

    pod update

    If you run into build issues, delete your Pods folder and run pod update again