Migration
Migrating from v6 to v7
While iOS v7 is a major version bump and contains breaking changes, we kept these changes to a minimum where possible.
Why upgrade to v7?
- The SDK now internalizes the creation of the BTAPIClient to allow merchants a streamlined integration pattern.
- The inits on the SDK now require all necessary paramters for the flow you are initalizing. Additionally we have moved all initilization to the init vs the dot syntax to utilize Swift best practices
- Updates for the latest versions of iOS and Xcode.
You can find a complete list of changes in iOS v7 in our CHANGELOG.
Minimum requirements
The Braintree iOS v7 SDK requires Xcode 16.2+, Swift 5.10+ and a minimum deployment target of iOS 16.0.
If your application contains Objective-C code, the Enable Modules build setting must be set to YES.
Installation
iOS v7 supports installation via Swift Package Manager, CocoaPods and Carthage.
The Installation section of the README has more information.
Carthage
iOS v7 requires Carthage v0.38.0+, which adds support for xcframework binary dependencies.
- Bash
carthage update --use-xcframeworksRequired code changes
Card
All properties within BTCard can only be accessed via the initalizer vs the dot syntax.
Updated initializer for BTCardClient(authorization: "<CLIENT_AUTHORIZATION>")
Venmo
All properties within BTVenmoRequest and BTVenmoLineItem can only be accessed via the initalizer vs the dot syntax.
Remove the fallbackToWeb boolean parameter from BTVenmoRequest. If a Buyer has the Venmo app installed and taps on "Pay with Venmo", they will automatically be switched to the Venmo app. If the Venmo app isn't installed, the Buyer will fallback to their default web browser to checkout.
The BTVenmoClient initializer now requires a universalLink for switching to and from the Venmo app or web fallback flow
Updated initializer for BTVenmoClient(authorization: "<CLIENT_AUTHORIZATION>", universalLink: "<MY_UNIVERSAL_LINK_URL")
SEPA Direct Debit
All properties within BTSEPADirectDebitRequest can only be accessed via the initalizer vs the dot syntax.
Updated initializer for BTSEPADirectDebitClient(authorization: "<CLIENT_AUTHORIZATION>")
Local Payments
All properties within BTLocalPaymentRequest can only be accessed via the initalizer vs the dot syntax.
Updated initializer for BTLocalPaymentClient(authorization: "<CLIENT_AUTHORIZATION>")
Rename BTLocalPaymentClient.startPaymentFlow(with:completion) to BTLocalPaymentClient.start(with:completion)
3D Secure
All properties within BTThreeDSecureRequest can only be accessed via the initalizer vs the dot syntax.
Updated initializer for BTThreeDSecureClient(authorization: "<CLIENT_AUTHORIZATION>")
Rename BTThreeDSecureClient.startPaymentFlow(with:completion) to BTThreeDSecureClient.start(with:completion)
PayPal
All properties within BTPayPalRequest, BTPayPalCheckoutRequest, BTPayPalVaultRequest, and BTPayPalLineItem can only be accessed via the initalizer vs the dot syntax.
Updated initializer for BTPayPalClient(authorization: "<CLIENT_AUTHORIZATION>")
For the App Switch flow, you must update your info.plist with a simplified URL query scheme name, paypal.PayPal Native Checkout
The PayPal Native Checkout integration is no longer supported. Please remove it from your app and use the PayPal integration.
American Express
Updated initializer for BTAmericanExpressClient(authorization: "<CLIENT_AUTHORIZATION>")
Apple Pay
Updated initializer for BTApplePayClient(authorization: "<CLIENT_AUTHORIZATION>")
Updated initializer for BTDataCollectorClient(authorization: "<CLIENT_AUTHORIZATION>")
Shopper Insights
Updated initializer for BTShopperInsightsClientV2(authorization: "<CLIENT_AUTHORIZATION>")
PayPal Messaging
Updated initializer for BTPayPalMessagingView(authorization: "<CLIENT_AUTHORIZATION>")