iOS initialization
Overview
Configure the D1 SDK
Example
var d1Task: D1Task!
let PUBLIC_KEY_EXPONENT: [UInt8] = [0x00, 0xa0] // Modulus bytes array
let PUBLIC_KEY_MODULUS: [UInt8] = [0x00, 0x00] // Exponent bytes array
var comp = D1Task.Components()
comp.d1ServiceURLString = ""
comp.issuerID = ""
comp.d1ServiceRSAExponent = Data(bytes: PUBLIC_KEY_EXPONENT, count: PUBLIC_KEY_EXPONENT.count)
comp.d1ServiceRSAModulus = Data(bytes: PUBLIC_KEY_MODULUS, count: PUBLIC_KEY_MODULUS.count)
comp.digitalCardURLString = ""
d1Task = comp.task()
// Initialize required SDKs
// Issuer application is required to provide consumerID
let consumerID = "" // obtained e.g. from server
let coreConfig = ConfigParams.coreConfig(consumerID: consumerID)
// required for Card Processing & Wallet Pay
let cardConfig = ConfigParams.cardConfig()
d1Task.configure([coreConfig, cardConfig]) { (errors) in
if let errors = errors {
for error in errors {
// Check error details to see whose config cause the errors, refer to D1 SDK Integration – Error Management section
}
}
}Last updated
Was this helpful?