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
- Install Carthage
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 inv4.0.1
to support Swift Package ManagerCreate development and production targets for your app (if you don’t have them already)
Run the following command to download and build the Olo Pay SDK and its dependencies
carthage update --use-xcframeworks
For each target, go to
General > Frameworks, Libraries, and Embedded Content
- 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
- Ensure all frameworks are set to
Embed & Sign
- Drag and drop the following frameworks from the
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
- Update the Olo Pay SDK version in your Cartfile
- Run the carthage update script from above and add any missing frameworks listed above