---
title: "Upgrade to Adyen iOS v5"
description: "Find out more about the major changes in this release."
url: "https://docs.adyen.com/online-payments/upgrade-your-integration/upgrade-to-ios-5-0-0"
source_url: "https://docs.adyen.com/online-payments/upgrade-your-integration/upgrade-to-ios-5-0-0.md"
canonical: "https://docs.adyen.com/online-payments/upgrade-your-integration/upgrade-to-ios-5-0-0"
last_modified: "2022-11-07T09:40:00+01:00"
language: "en"
---

# Upgrade to Adyen iOS v5

Find out more about the major changes in this release.

[View source](/online-payments/upgrade-your-integration/upgrade-to-ios-5-0-0.md)

If your integration uses iOS v4.10.1 or before and you are upgrading it to use v5.0.0, make the following changes to your integration.

## Checkout API version

We recommend using [Checkout API v69](/online-payments/release-notes?integration_type=api\&version=69).

## Step 1: Upgrade methods

Change the methods in your integration from the ones in the **v4.10.1 or earlier** column to the ones in **v5.0.0** column:

| v4.10.1 or earlier                                                                                         | v5.0.0                                                                                                       |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `didFinalize(with success: Bool)`                                                                          | `didFinalize(with success: Bool, completion: (() -> Void)?)`                                                 |
| `finalizeIfNeeded(with success: Bool, completion: (() -> Void)?)`                                          | `finalizeIfNeeded(with success: Bool, completion: (() -> Void)?)`                                            |
| `didOpenExternalApplication(_ component:`                                                                  | `didOpenExternalApplication(component:`                                                                      |
| `requestOrder(_ component: Component, completion: @escaping (Result<PartialPaymentOrder, Error>) -> Void)` | `requestOrder(for component: Component, completion: @escaping (Result<PartialPaymentOrder, Error>) -> Void)` |
| `cancelOrder(_ order: PartialPaymentOrder)`                                                                | `cancelOrder(_ order: PartialPaymentOrder, component: Component)`                                            |

## Step 2: Upgrade initializing Drop-in and Components

When initializing Drop-in or a Component, you must now pass an instance of [AdyenContext](https://adyen.github.io/adyen-ios/5.0.0/documentation/adyen/adyencontext). For example:

```swift
// Create the APIContext with the client key and environment.
let apiContext = APIContext(clientKey: clientKey, environment: Environment.test)

// Create the AdyenContext with the instance of APIContext and analytics configuration.
let adyenContext = AdyenContext(apiContext: apiContext, analyticsConfiguration: analyticsConfiguration)

// Set the instance of AdyenContext in the Drop-in configuration.
let configuration = DropInComponent.Configuration(context: adyenContext)
```

## Step 3: Update Components configuration

The configuration for a Component is now in a configuration object that corresponds to the [Component](https://github.com/Adyen/adyen-ios/tree/develop/AdyenComponents) type. For example, to style the Redirect Component:

```swift
// The configuration object for the Redirect Component.
var redirectComponentConfiguration = RedirectComponent.Configuration()
// Configuration for the Redirect Component.
redirectComponentConfiguration.style = //Your styling.
```

## Step 4: Update payment methods configuration

The configuration for a payment method is now in a configuration object that corresponds to the [payment method component](https://github.com/Adyen/adyen-ios/tree/develop/AdyenComponents). For example, to configure the Card Component:

```swift
// The configuration object for the Card Component.
var cardComponentConfiguration = CardComponent.Configuration()
// Configuration for the Card Component.
cardComponentConfiguration.showsStorePaymentMethodField = true
cardComponentConfiguration.localization = // Your localization configuration.
```

In [v5.9.0](/online-payments/release-notes/?title%5B0%5D=iOS%2BComponents%2FDrop-in\&version%5B0%5D=5.9.0), iDEAL uses `InstantPaymentComponent`.

### Apple Pay

For [`ApplePayComponent.Configuration.init()` ](https://adyen.github.io/adyen-ios/5.0.0/documentation/adyen/applepaycomponent/configuration/init\(payment:merchantidentifier:\)), the only parameters you can pass are `merchantIdentifier` and `payment`. All other Apple Pay configuration properties are now mutable.

Change the value of the `payment` property from the one in the **v4.10.1 or earlier** column to the one in **v5.0.0** column::

| v4.10.1 or earlier | v5.0.0                                                                                                                                    |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `payment: Payment` | [`payment: ApplePayPayment`](https://adyen.github.io/adyen-ios/5.0.0/documentation/adyen/applepaycomponent/configuration/applepaypayment) |

### Cards

The value for each of the following properties is now a strongly typed array of values from the [`CardType` enum](https://adyen.github.io/adyen-ios/5.0.0/documentation/adyen/cardtype):

* `CardPaymentMethod.brands`
* `StoredCardPaymentMethod.brands`
* `StoredCardPaymentMethod.brand`

## Step 5: (Optional) Update Drop-in configuration

You must do this if your integration is a Drop-in integration.

The configuration for Drop-in is now in a [`DropInComponent.Configuration()` ](https://adyen.github.io/adyen-ios/5.0.0/documentation/adyen/dropincomponent/configuration)object. For example:

```swift
// The Drop-in configuration object.
let dropInConfiguration = DropInComponent.Configuration(adyenContext: adyenContext)
// Optional configuration to disable showing the preselected stored payment method.
dropInConfiguration.allowsSkippingPaymentList = true
```
