Disable Warning Dialog if Bluetooth is powered off iOS
I got the following response from an apple developer :
In iOS7, the CBCentralManagerOptionShowPowerAlertKey
option lets you disable this alert.
If you have a CBCentralManager
, then when you initialise it, you can use the method -[CBCentralManager initWithDelegate:queue:options]
Example:
In my .h file, I have a CBCentralManager * manager
.
In my .m file:
NSDictionary *options = @{CBCentralManagerOptionShowPowerAlertKey: @NO};
_manager = [[CBCentralManager alloc] initWithDelegate:self queue:nil options:options];
[_manager scanForPeripheralsWithServices:nil options:options];
With this code, the warning no longer appears. I hope that helps!
Disable Location Accuracy message when using iBeacon
You can't. iBeacon based on Bluetooth so it just not work without turning it On.
Upd. but of course you can check that bluetooth disabled with CBCentralManager
and inform user in other way before using iBeacon code
LE_POWER_OFF_HEADER default alert using CoreBluetooth
Try with device, you will get proper message in localized language.
Related Topics
iOS 7.0 and Arc: Uitableview Never Deallocated After Rows Animation
Xcode 9 Crash When Open Storyboard
Pass Uicollectionview Touch Event to Its Parent Uitableviewcell
Uipageviewcontroller Gesture Is Calling Viewcontrollerafter: But Doesn't Animate
What Does $0 Represent in Closures in Swift
Storing [Nsnull Null] Values in Nsuserdefaults, from JSON Serialization, Causes Unwanted Exceptions
How to Resolve iOS Link Errors with Opencv
How to Overlay a Skscene Over a Scnscene in Swift
Why Don't My Views Show Up in Storyboards and Are Greyed Out in the Left Pane
Code Signing Issue in Xcode Version 8
Declaring Global Variables in Swift
iOS Application Using Facebook -- Rejected
Objective C- Trouble Updating UI on Main Thread
Undefined Symbols for Architecture Armv7 for Cocoapods Libraries
Autolayout Ignores Multi-Line Detailtextlabel When Calculating Uitableviewcell Height (All Styles)
Mask Uiview with Uibezierpath - Stroke Only
Rails: Redirect_To 'Myapp://' to Call iOS App from Mobile Safari