Open Location Settings Not working in ios 11 Objective c?

Create the Objective C code for open the Location settings in IOS 11.But code working in IOS 10 and before IOS Releases


But It's Not working


I want go this section in settings


Settings > Privacy > Location Settings


I try many code but not working in ios 11.

my code

=======

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"App-Prefs:root=LOCATION_SERVICES"]]

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"App-Prefs:root=Privacy&path=LOCATION"]]


[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=Privacy&path=LOCATION"]]

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]]


[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"app-settings:root=LOCATION_SERVICES"]]

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"app-settings:root=Privacy&path=LOCATION"]]

Accepted Reply

All such prefs: and similar URL schemes are private API. Your app will be rejected, even if you did find something that happened to work this week.


The only supported URL, as far as I know, is the one to open your app’s Settings page - UIApplicationOpenSettingsURLString. You can’t drill any deeper.

Replies

But It's Not working

Do you mean does not compile ?

Or get runtime error ? Which error precisely ?

Something else ?

Open settings with other menu


For Example : My app name is Amazon


Opened the Amazon app.


Not open the Privacy > Location Services.


No error shows.

All such prefs: and similar URL schemes are private API. Your app will be rejected, even if you did find something that happened to work this week.


The only supported URL, as far as I know, is the one to open your app’s Settings page - UIApplicationOpenSettingsURLString. You can’t drill any deeper.