Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable/Disable bluetooth programmatically using CoreBluetooth

Tags:

ios

bluetooth

I want to enable/disable Bluetooth programmatically without using private API (which will be rejected by App Store). I just see CoreBluetooth can get current bluetooth state. Can I archive it with CoreBluetooth, I cannot find out any relevant information to that.

Thanks for any advanced help!!!

like image 260
Lucy Avatar asked Dec 30 '25 08:12

Lucy


2 Answers

You cannot enable or disable the Bluetooth radio through an app. You can disable your own app's use of Bluetooth but the Bluetooth radio will still be enabled.

Only the user can enable/disable Bluetooth through settings.

like image 65
Paulw11 Avatar answered Dec 31 '25 22:12

Paulw11


You cannot switch On/Off the bluetooth from your app as it is not available in the Core Bluetooth framework. You can simply pull out the Notification centre to switch it ON and Off which can easily serve your purpose.

like image 29
Shikhar varshney Avatar answered Dec 31 '25 22:12

Shikhar varshney