How to handle user interaction with new Bluetooth prompt in iOS13?

jtthjtth Member ✭✭

After updating to iOS 13, our app experienced crashes, as I'm sure many did. Our problem was due to not including the newly required bluetooth key in the Xamarin.iOS projects Info.plist file....

"There’s a new key for the Info.plist file: NSBluetoothAlwaysUsageDescription, which you can use to explain how and why your app uses Bluetooth. In contrast to the existing NSBluetoothPeripheralUsageDescription, the new description will be shown as part of the new pop-up, and also in the Settings app on the Bluetooth Privacy screens."

However after adding this upon app start the first that occurs is presenting the user with the new Bluetooth access prompt.

We aren't clearly seeing how to control both WHEN the prompt is shown and how to handle/address the response upon user interaction WITH the prompt. In-fact after this prompt is interacted with the app has no "return" point as it were. Can't quite find a break-point for the prompt interaction / result handling and our app appears to have no return-point from this prompt. I.e., using breakpoints from app initialization to Bluetooth prompt presenting doesn't show and interactions with prompts/bluetooth.

So- how to present/capture/handle user interaction with the new Bluetooth prompt in iOS 13?

NOTE*: To be absolutely transparent - our application doesn't initialize any Bluetooth instances (ex: CBCentralManager) rather it takes advantage of a native framework that itself utilizes BluetoothLE internally (out of our control).

Tagged:

Best Answer

Answers

Sign In or Register to comment.