I want to execute code on background, when user clicks on app icon? Is it possible? I want to turn bluetooth when I click on app icon on Iphone. Thanks a lot !
Asked
Active
Viewed 55 times
1 Answers
0
As per this answer, there is no way to turn on Bluetooth without Apple rejecting your app. Therefore, the best way to have the user turn on Bluetooth is to tell the user to do so(e.g. through an alert/popup).
As for executing code in the background, check out this answer, which describes how threading works in Swift.

Xcoder
- 1,433
- 3
- 17
- 37