5

Code that I used for iOS 10 no longer works on iOS 11... Any ideas what to change? I need to open Bluetooth Settings not general iOS Settings that is getting opened by code below

if let settings = URL(string: "App-Prefs:root=Bluetooth") {
        UIApplication.shared.open(settings, options:[:], completionHandler:nil)
}
Yaroslav Dukal
  • 3,894
  • 29
  • 36

1 Answers1

0

From iOS 11 onwards, Apple has suggested to use public APIs or remove the functionality using “prefs:root" or "App-Prefs:root" URL scheme which is a private entity.

So if you use above url schemes your app might get reject. If you want to open app settings, use UIApplicationOpenSettingsURLString.

Rachit Agarwal
  • 356
  • 2
  • 9