Setup With Carthage

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

Important

If you have manually added the Olo Pay SDK as a dependency to your project and are now switching to using Carthage, 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 Carthage
  2. Add the Olo Pay SDK to your Cartfile using the tag of the desired Olo Pay SDK release:

    github "ololabs/olo-pay-ios-sdk-releases" "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

  3. Create development and production targets for your app (if you don’t have them already)

  4. Run the following command to download and build the Olo Pay SDK and its dependencies

    carthage update --use-xcframeworks

  5. For each target, go to General > Frameworks, Libraries, and Embedded Content

    1. Drag and drop the following frameworks from the Carthage/Build folder
      • OloPaySDK.xcframework
      • Stripe.xcframework
      • StripeCore.xcframework
      • StripeUICore.xcframework
      • Stripe3DS2.xcframework
      • StripeApplePay.xcframework
      • StripePayments.xcframework
      • StripePaymentsUI.xcframework
    2. Ensure all frameworks are set to Embed & Sign

Note

Some sections of the Carthage documentation refer to running a copy-frameworks script for iOS projects. This does not apply to XCFrameworks and is not needed

SDK Updates

  1. Update the Olo Pay SDK version in your Cartfile
  2. Run the carthage update script from above and add any missing frameworks listed above