iOS CoreBluetooth passively check if Bluetooth is enabled without prompting user to turn Bluetooth on
iOS 7 has a new options
parameter in the create of CBCentralManager
to turn this off, named CBCentralManagerOptionShowPowerAlertKey
I'd love a solution for earlier iOS.
Check if Bluetooth is Enabled?
The only way I've ever found to do this is with private frameworks (like Bluetooth Manager, for one) that are only useful for Jailbroken apps... and Apple will reject any app using a private framework. I believe it's even against their ToS to do anything with bluetooth, so you're out of luck there.
What causes this iOS permission prompt for use Bluetooth for new connections?
I think that this second prompt is a new iOS13 variation on "please enable Bluetooth" and that it appears because the user has set Bluetooth to "off" in the control centre, but not turned Bluetooth fully off in Settings.
The description of "use Bluetooth for new connections" seems to correspond to the "partially enabled" state (white button in control centre).
This second prompt can be stopped using the CBCentralManagerOptionShowPowerAlertKey: @(NO) option to the CBCentralManager init call.
Related Topics
iOS Check If Application Has Access to Microphone
Constant Movement in Spritekit
Setkeepalivetimeout iOS Behavior, Exceeded 15 Wakes in 300 Sec
Get Instance of Viewcontroller from Appdelegate in Swift
Uiimagepicker Cameraoverlayview Appears on Retake Screen
How to Scroll to a Particluar Index in Collection View in Swift
Custom Back Indicator Image and iOS 11
How to Clear or Clean Specific Pod from the Local Cocoapods Cache
Wkwebview Causes My View Controller to Leak
Xcode Error While Validation - "Your Binary Is Not Optimized for iPhone 5"
Get Pixel Value from Cvpixelbufferref in Swift
Can't Submit Apps to Appstore: Error Itms-90534: "Invalid Toolchain
What Is Difference Between Urlwithstring and Fileurlwithpath of Nsurl
Nsnotificationcenter Swift 3.0 on Keyboard Show and Hide
How to Parse Iso 8601 Using Nsdateformatter with Optional Milliseconds Part