stripe / stripe-terminal-ios

Stripe Terminal iOS SDK
https://stripe.com/docs/terminal/sdk/ios
Other
104 stars 65 forks source link

Reader is not getting disconnected in iPhone #333

Closed harsh7703 closed 2 weeks ago

harsh7703 commented 2 weeks ago

Summary

The disconnect reader is working only on the iPad. On iPhone, we are receiving this error from SDK in console. I have updated the SDK to version 4.0.0, but I am still encountering the same issue (M2 or S700) on iPhone. On iPad it seems to be working fine. Below is the error code that might help identify the root cause. This issue is blocking the release of the new app version, so I would appreciate your assistance in resolving it as soon as possible.

collectPaymentMethod failed: Error Domain=com.stripe-terminal Code=2020 "The command was canceled." UserInfo={NSLocalizedDescription=The command was canceled., com.stripe-terminal:Message=The command was canceled.} errorCode::2020

Code to reproduce

DispatchQueue.main.async {
            Terminal.shared.disconnectReader { error in
                if let error = error {
                    print("Disconnect failed: \(error)")
                } else {
                    print("--------------- Disconnected --------------")
                }
            }
        }

iOS version

18.1 ## Installation method Cocoapods ## SDK version 4.0.0 ## Other information

N/A