SocketMobile / cocoapods-capturesdk

CaptureSDK for iOS
Other
6 stars 0 forks source link

The S740 scanner loses connection when another application that uses the SDK is opened (iPadOS 16.5) #6

Closed KevinRondon closed 1 year ago

KevinRondon commented 1 year ago

Since the iPadOS 16.5 update, I have been experiencing issues connecting the S740 scanner to different applications that use the Socket Mobile SDK. I conducted an experiment with the following steps while having the Socket in Application Mode:

This issue occurs with any two apps that use the SDK.

I would greatly appreciate your prompt assistance as we rely on your integration for our company's operations and use the Square app, which immediately replicates the issue, causing disruptions in our clients' POS systems. I am available to provide any additional information necessary to replicate the error.

It is important to mention that we don't experience this issue on previous versions of iOS.

cyrille-socket commented 1 year ago

Hi @KevinRondon ,

it seems like iPadOS 16 introduced some Bluetooth issues and especially since 16.5.

Can you confirm that your issue is on iPadOS and not on iOS please?

Cyrille

KevinRondon commented 1 year ago

Hi @cyrille-socket ,

You are right, it's on iPadOS 16.5. No further information about the iPadOS Bluetooth problem?

Thank you for your response and attention

cyrille-socket commented 1 year ago

Hi @KevinRondon

we are still investigating on the issue but it seems that something has changes in iPadOS 16.5 causing this. It's still a bit unclear to us at the moment.

Keep you posted.

Cyrille

cyrille-socket commented 1 year ago

Hi @KevinRondon

so good news, we have identified the issue and will provide a new SDK version on Monday next week.

Seems like  changed something in the ExternalAccessory framework to handle Bluetooth connections...

KevinRondon commented 1 year ago

Hi @cyrille-socket

Those are fantastic news! I really appreciate you keeping me updated with the information. I will be fully attentive to the Monday update. You have no idea how happy it makes us to hear this.

I understand, it makes sense. Other external devices to Apple have also caused us some issues with Bluetooth connectivity in this new version.

Thank you very much for your work and attention. Integration with you is vital for us.

cyrille-socket commented 1 year ago

Hi @KevinRondon

we just released the new version of CaptureSDK with the fix for Bluetooth connection due to iPadOS 16.5.

https://github.com/SocketMobile/cocoapods-capturesdk/releases/tag/1.6.39

Let me know if that works for you.

Cyrille

KevinRondon commented 1 year ago

Hi @cyrille-socket

It seems to be working fine! We updated two of our apps with the new version, and they connect without any issues when switching between them. However, we are experiencing conflicts with a third-party app (Square POS) that also uses the SDK. When we open their app, the problem arises. Nevertheless, we have already informed them about the need to update their SDK.

Thank you very much for your update and attention.

KevinRondon commented 1 year ago

iPadOS 16.5+ disconnection problem still occurs when switching apps fast.

Hello @cyrille-socket again! We managed to get Square to update their application with the new SDK version where you resolved the disconnection issue between different apps when using the SDK. In simple tests, it worked with our app. However, our customers started experiencing the problem again intermittently. Therefore, we started investigating, and one of the things we found is that if you switch between applications before it connects in one of them, the problem resurfaces, and the socket remains completely disconnected (when the socket is disconnected, it also affects other Bluetooth devices that we have paired in the app, such as Star Micronics printers, this doesn't happen if we don't have the socket connected at any time, which is quite serious for us).

In short, quick app switching replicates the problem. Tomorrow, I'll have the devices at my disposal, in case you need more information on how to replicate the issue.

cyrille-socket commented 1 year ago

Hello @KevinRondon

that's quite unfortunate. At the moment I don't reproduce this behaviour.

The only thing I can tell you is that Star does not seem to have updated its SDK since quite some time so they also should address this issue by closing the connection of their Bluetooth classic printers.

We'll continue to investigate and keep you posted

KevinRondon commented 1 year ago

Hey @cyrille-socket,

The problem is intermittent, sometimes it's easier to replicate than others. I conducted some tests recorded on video to show the issue. These tests were done with only the Socket Mobile connected (nothing from Star was connected, and the devices were forgotten, meaning the only device paired with the iPad is the Socket).

The iPad version is 16.5.1.

For the first test, I used the following Socket Mobile applications:

SM Keyboard by Socket Mobile 2.0.5 Socket Mobile Companion 3.1.3

As you can see, when interacting rapidly between the applications, there's a moment when the device gets disconnected and doesn't connect in either of the two applications. Most of the time, turning off the Socket and turning it back on again makes it work again, but there have been cases where I had to restart the iPad.

For the second test, I used the apps that our clients use, and the same issue occurs. Among switching apps, there's a moment when the connection is lost in the apps.

Videos with the tests

KevinRondon commented 1 year ago

Hi @cyrille-socket , I wanted to ask if there is any update. Were you able to replicate the issue? For us, integration with Socket is currently a major problem with our clients, and we have had to find solutions by integrating with other companies. However, we really want to continue supporting Socket Mobile on our platform. Any update on the issue would be appreciated by us.

socketPM commented 1 year ago

@KevinRondon Sorry we don't have further updates yet. But I want to add a few points:

Thanks,

KevinRondon commented 1 year ago

Thank you for your response @socketPM

cyrille-socket commented 1 year ago

Hi @KevinRondon

from our internal tests and several other developers feedback, iPadOS 16.6 solved the issue.

In our SDK, the additional work done to close the Bluetooth Classic connection after putting an app in background is still effective and does not harm.

Let me know if you already updated your device and advised your customers to do so.

Cyrille

cyrille-socket commented 1 year ago

Hi @KevinRondon

I'm gonna close this issue. In case you still have issues with BT connection, please reopen it.

But last Apple update fixes the issue following all the feedback from developers we had now.

Best, Cyrille