You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the async version of presentCheckoutPreferences() and a reader is selected, the app crashes with Thread 1: EXC_BAD_ACCESS (code=1, address=0x28)
as soon as the Done button is tapped to close the view controller.
After further investigation, we discovered that the completion block of the older non-async presentCheckoutPreferences() is called multiple times. That might be the issue in the SDK.
As a workaround, we use the following code:
static func presentCheckoutPreferencesFixed(from vc: UIViewController, animated: Bool) async throws -> Bool {
return try await withCheckedThrowingContinuation { @MainActor cont in
var resumed = false
self.presentCheckoutPreferences(from: vc, animated: animated) { @MainActor success, err in
if resumed { return }
resumed = true
if let err {
cont.resume(throwing: err)
} else {
cont.resume(returning: success)
}
}
}
}
It would be great if you can fix this issue in the SDK.
The text was updated successfully, but these errors were encountered:
When using the async version of
presentCheckoutPreferences()
and a reader is selected, the app crashes withThread 1: EXC_BAD_ACCESS (code=1, address=0x28)
as soon as the Done button is tapped to close the view controller.
After further investigation, we discovered that the completion block of the older non-async
presentCheckoutPreferences()
is called multiple times. That might be the issue in the SDK.As a workaround, we use the following code:
It would be great if you can fix this issue in the SDK.
The text was updated successfully, but these errors were encountered: