1.29.1 -> 1.30.0

Breaking Changes

Setting identity

API complete redesing

  • Old :

    func setIdentity(completion: @escaping ResultHandler<Void>)
  • New :

    func setIdentity() async -> Result<Void> 
  • Changed from completion-based (Callback) to async await approach

  • Returns Result<Void>

**Before:**
let identity = Identity(apiKey: "api-key", externalReferenceID: "user-id")

identity.setIdentity { result in
    switch result {
    case .success(let value):
        // Identity successfully set
    case .failure(let error):
        // Failure
    }
}

**After:**
let identity = Identity(apiKey: "api-key", externalReferenceID: "user-id")

let result = await identity.setIdentity()

switch result {
case .success(let value):
    // Identity successfully set
case .failure(let error):
    // Failure
}

Import new framework

To be able to use the SDK, the new ImsKmpSdk needs to be imported

Last updated