iOS13 - Detect if bluetooth is enabled without prompting bluetooth usage request
Asked Answered
C

0

2

In previous iOS versions you could detect if the user had bluetooth enabled or not without actually prompting the user's permission to access bluetooth. In iOS13, CBCentralManager now prompts bluetooth permission just to check if they have bluetooth turned on or not, regardless of if the app is actually going to use bluetooth directly.

Our app uses Apple's multipeer connectivity framework to communicate between devices (peer to peer) which uses a combination of wifi and bluetooth, or just wifi if bluetooth is disabled, but that is slower, so we like to remind our users to turn on bluetooth for a faster connection. Using this framework does not actually require a permission prompt for the app to use bluetooth because Apple manages all of that in a closed box so our app itself doesn't use bluetooth or require a permission prompt to work, but Apple's multipeer framework works better if the user has bluetooth enabled.

We want to simply remind the user to enable bluetooth for a faster connection, but only if they don't already have it on. However just checking if it is enabled the old way now requires a bluetooth permission prompt even though we won't be using bluetooth in the app.

In iOS13 is there a new method for just checking if bluetooth is enabled or not that doesn't require a bluetooth permission prompt.

Cholula answered 3/11, 2019 at 18:31 Comment(1)
Please do not flag this as possible duplicate if the other question's answers are not iOS13+ related as this is a new issue specific to iOS13+Cholula

© 2022 - 2024 — McMap. All rights reserved.