Search code examples
iosbluetoothcore-bluetooth

IOS How to enable bluetooth in swift code


On Android. The code that turns Bluetooth on and off. I am trying to develop an iPhone, is there any function in swift code?


Solution

  • In short, no public API can control Bluetooth on/off. The post provided by Skywalker said the same thing too, that post provides a private API to control the on/off status.

    My project needs this function before, and I remember no public API to control Bluetooth on/off. But there are APIs to detect the status of bluetooth about on/off.