Unable to navigate to Bluetooth Settings

I have tried below code to open [Settings(App) -> Bluetooth Settings] but it is navigating to App permission screen instead of Bluetooth Settings. I have tried to search but didn't get any latest documentation regarding it. Is there any way to do this?

guard let url = URL(string: UIApplication.openSettingsURLString) else {
            return
        }
        if UIApplication.shared.canOpenURL(url) {
            UIApplication.shared.open(url, options: [:], completionHandler: nil)
        }
Answered by Kanuga_p in 777992022

Thank you @eskimo for your response..Can we navigate the user to the top of the device settings i.e General Settings instead of App permission settings?

it is navigating to App permission screen instead of Bluetooth Settings.

Right. That’s what UIApplication.openSettingsURLString is documented to do.

There is no supported way to open Setting > Bluetooth [1].

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] If you search the ’net you’ll find lots of bad advice on this topic. See this post for more about that.

Accepted Answer

Thank you @eskimo for your response..Can we navigate the user to the top of the device settings i.e General Settings instead of App permission settings?

What are you trying to enable the user to do? Most things are not possible to navigate directly into the Settings app. Secret apple sauce.

If Bluetooth is off and you want to turn it on AND you're using CoreBluetooth, initialize your manager with the power key. This will trigger a prompt to the user to either enable Bluetooth, or start new connections if that was turned off for the day.

self.centralManager = CBCentralManager(delegate: nil, queue: .main, options: [CBCentralManagerOptionShowPowerAlertKey: true])
Unable to navigate to Bluetooth Settings
 
 
Q