Can we use prefs URL scheme "prefs:root=Bluetooth" to open Bluetooth settings menu in iOS10 and above?

Hi,


I need to open the bluetooth settings menu in IOS10 and above version from application.



But [[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"prefs:root=Bluetooth"]]; is not working in ios 10.

After exploring multiple document I got below link which provide code which will work properly.


https://gist.github.com/johnny77221/bcaa5384a242b64bfd0b8a715f48e69f

I wanted to know if the usage of the above piece of code is acceptable in iOS10 and above. Is this code OK to be used by App store guidelines?


Please help me to solve this issue. If any other solution please provide some link or sample code.


Thanks in advance,

Prem

Replies

Do you have any idea how can this work without our app getting Rejected.