Can we launch our app settings page from our ios app?

368 Views Asked by At

I have an iOS app, in which the user can enable/disable location tracking permission, so, on clicking a button in my app, I have to navigate the user to the location access page in system preference app,

I went through lots of answers, which suggested me to use

UIApplication.shared.open(URL(string: "App-prefs:LOCATION_SERVICES")!)

but they were all able to move to default settings, is it possible to move to a specific page like below image, i.e Settings -> Privacy -> Location Services -> My_APP ->

enter image description here

Thanks in advance..

1

There are 1 best solutions below

2
On

There is not a way to navigate the user to that specific settings you're asking about.
Also, please note it's not advised to use private APIs, including URLs like the one you mentioned in your question ("App-prefs:LOCATION_SERVICES").
To launch the Settings app, it's better to use existing UIApplication.openSettingsURLString:

UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)