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
I'm encountering a bug right now where when I try to collect payment and then background the app, the Terminal.shared.connectedReader doesn't get to set to nil.
In most cases, the reader(_: Reader, didDisconnect _: DisconnectReason) delegate gets called when I try to background the app but there are times when it won't get called and in that time, Terminal.shared.connectedReader is still holding to the connectedReader instead of nil
The TapToPayConnectionConfigurationBuilder.setAutoReconnectOnUnexpectedDisconnect(:) is set to false in the setup above.
Hi, sorry for the delays. I have not been able to reproduce the issue with my setup. Are there any other logs emitted by the Terminal SDK between the connect / disconnect logs? Also I see that connecting is being emitted twice, is that because of some sort of mapping that you are using of the ConnectionStatus enum?
For some detail, the disconnect delegate will be called when applicationDidEnterBackgroundNotification is triggered, unless the reader is already disconnected, which I suspect is causing the issue (i.e. applicationDidEnterBackgroundNotification is getting triggered before the connection progresses far enough to set the reader connection state to connected). I will see if we can lessen the risk of this happening in the next release but as I can't reproduce the issue locally, I can't guarantee that it will address your issue.
Summary
I'm encountering a bug right now where when I try to collect payment and then background the app, the
Terminal.shared.connectedReader
doesn't get to set tonil
.In most cases, the
reader(_: Reader, didDisconnect _: DisconnectReason)
delegate gets called when I try to background the app but there are times when it won't get called and in that time,Terminal.shared.connectedReader
is still holding to theconnectedReader
instead ofnil
The
TapToPayConnectionConfigurationBuilder.setAutoReconnectOnUnexpectedDisconnect(:)
is set to false in the setup above.Code to reproduce
Here is a video showing me trying to reproduce it (at around 00:15 where I got to reproduce it).
https://drive.google.com/file/d/1iTTuZTLN07XNUdafoN-A3h1Neug9APUl/view?usp=sharing
iOS version
18.1.1
Installation method
SPM
SDK version
4.1.0
Other information
The text was updated successfully, but these errors were encountered: