To be able to use iOS Components 4.0.0, make sure your integration supports the changes described on this page.
Checkout API version
iOS Components 4.0.0 is intended to be backwards compatible with all Checkout API versions, but we recommend you use Checkout API v67 or later.
New module structure
iOS Components 4.0.0 have a more granular module structure, which allows you to selectively import the functionality you need.
| Module | Description |
|---|---|
AdyenDropIn |
The DropInComponent. |
AdyenCard |
Components related to card payments, for example CardComponent, StoredCardComponent, or BCMCComponent. |
AdyenComponents |
All other payment method components, for example QiwiWalletComponent, MBWayComponent, ApplePayComponent, BLIKComponent. |
AdyenWeChatPay |
The WeChat Pay component which you must import separately. |
AdyenActions |
All action components, for example AwaitComponent, VoucherComponent, RedirectComponent, or AdyenActionComponent. |
AdyenEncryption |
The encryption helpers. |
AdyenSwiftUI |
Integration helpers for SwiftUI, for example ViewControllerPresenter or ViewModifier. |
The README file on Github has more details about importing the modules using CocoaPods, Carthage, and Swift Package Manager.
Removed deprecated elements
| Removed | Use instead |
|---|---|
FormHeaderItem |
FormTextItem |
showLargeTitle property on all components |
Custom wrapping ViewController |
FormFooterItem |
FormTextItem |
CardTypeDetector |
Array<CardType>.type(forCardNumber cardNumber: String) |
cornerRadius property from styles |
cornerRounding |
publicKey parameter from CardComponent constructor |
Constructor with the clientKey parameter. |
barBackgroundColor properties from NavigationStyle |
backgroundColor |
barTintColor properties from NavigationStyle |
tintColor |
mainButton properties from FormComponentStyle |
mainButtonItem |
and secondaryButton properties from FormComponentStyle |
secondaryButtonItem |
dictionaryRepresentation method from Details |
Encodable |
Component initialization
When initializing a component, you must create an instance of
APIContext
:
| Parameter name | Required | Description |
|---|---|---|
clientKey |
![]() |
Your client key. |
environment |
![]() |
Use test. When you are ready to accept live payments, change the value to one of our live environments. |
// When you are ready to go live, change environment to Environment.live
// or to other environment values described in https://adyen.github.io/adyen-ios/5.0.0/documentation/adyen/
let apiContext = APIContext(environment: Environment.test, clientKey: clientKey)
Starting iOS Components 4.0.0, the client key is the only way to do client-side authentication. If you haven't already, switch to using the client key for your integration.
Payment method configuration
Renamed the payment method configuration objects:
| Old name | New name |
|---|---|
PaymentMethodsConfiguration |
DropInComponent.Configuration |
CardConfiguration |
CardComponent.Configuration |
ApplePayConfiguration |
ApplePayComponent.Configuration |
Handling the end of a component flow
In previous versions, stopLoading(success:completion:) used to be called at the end of any component flow. Starting 4.0.0, stopLoading(success:completion:) is removed and replaced with two functions to handle different situations:
| Function | Situation |
|---|---|
finalizeIfNeeded(success:) |
|
cancelIfNeeded() |
Apple Pay supported card networks
We removed excludedCardNetworks.
To get the list of card networks for Apple Pay, iOS Components now uses the
brands
array in the /paymentMethods response.
Make sure that you have added the card type in your Customer Area to have it appear in the /paymentMethods response.
