On Android. The code that turns Bluetooth on and off. I am trying to develop an iPhone, is there any function in swift code?
Asked
Active
Viewed 2,026 times
-1
-
Please search before asking. https://stackoverflow.com/a/23838229/5316422 – Skywalker Sep 06 '18 at 02:20
-
I am looking for code to control Bluetooth. I already know how to show alert – bnnnw154 Sep 06 '18 at 02:51
-
That post clearly states that its not possible. Best possible alternative is to show an alert which will take you to bluetooth setting inside device settings – Skywalker Sep 06 '18 at 03:06
1 Answers
0
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.

AechoLiu
- 17,522
- 9
- 100
- 118
-
1I dont think Apple will provide any API that can be used to control this. It will go against everything they preach – Skywalker Sep 06 '18 at 03:04