Asynchronous APIs on D1 SDK 4.4.0
Asynchronous APIs on D1 SDK 4.4.0
Overview
D1 SDK 4.4.0 introduces asynchronous API updates for Android and iOS.
On Android, the updated APIs support coroutine-based integrations. On iOS, the updated APIs support Swift concurrency. These changes apply to the Secure Card Display and Push Provisioning APIs.
Use this guide to review the affected APIs and update your issuer application.
What changed
The previous API surface is deprecated in D1 SDK 4.4.0. The deprecated APIs are now provided under the relevant product:
Use Secure Card Display for card display flows.
Use Push Provisioning for wallet digitization flows.
If your issuer application uses asynchronous calls, update those calls during the migration:
On Android, use the Kotlin coroutine-based APIs.
On iOS, use the Swift concurrency-based APIs.
This page lists the APIs changed in 4.4.0.
Migrate to the product-specific APIs
Update asynchronous handling
Use the Kotlin coroutine-based APIs if your issuer application uses Kotlin coroutines.
This simplifies asynchronous code and reduces callback handling.
Secure Card Display and Push Provisioning calls now return Task<T> instead of using Callback.
Use await() in coroutine-based integrations
Import the await extension explicitly:
Coroutine-based example:
Use execute(callback) in non-coroutine integrations
Use the Swift concurrency APIs if your issuer application uses Swift concurrency.
This makes asynchronous code easier to read and maintain.
Secure Card Display and Push Provisioning calls now use async throws instead of completion handlers.
API changes in 4.4.0
Use this section to review the APIs changed in D1 SDK 4.4.0.
Initialize each product service from d1Task before calling the product APIs.
Secure Card Display
getCardMetadata
Before:
Now:
getCardDetails
Before:
Now:
displayCardDetails
Before:
Now:
cardMetadata
Before:
Now:
cardDetails
Before:
Now:
displayCardDetails
Before:
Now:
Push Provisioning
addDigitalCardToScheme
Before:
Now:
addDigitalCardToOEM
Before:
Now:
getTokenRequestorList
Before:
Now:
getCardDigitizationState
Before:
Now:
New in 4.4.0:
cardDigitizationState
Before:
Now:
addDigitalCardToOEM
Before:
Now:
digitalCardPass to digitalCard
Before:
Now:
tokenRequestorList
Before:
Now:
addDigitalCardToScheme
Before:
Now:
New in 4.4.0:
Last updated
Was this helpful?