Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to programmatically open Settings > Privacy > Location Services in iOS 11+?

If locationServicesEnabled return false, I'm prompting the user to enable their Location Services. The following URL works for 10.0+, redirecting the user to the Settings app and directly to the Location Services screen:

URL(string: "App-Prefs:root=Privacy&path=LOCATION")

However this doesn't work in iOS 11. It opens the Settings app, but doesn't drill down to the Location Services. Anyone knows what's the new URL for iOS 11+?

like image 961
zeus Avatar asked Sep 12 '18 18:09

zeus


1 Answers

Apple published a list of URLs which they explicitly allow at this link. Unfortunately if you use other URLs (such as the one you are trying to use) this can get your app rejected from the App Store.

Short answer: You cannot do what you are trying to do without breaking the App Store rules.

like image 85
ehmjaysee Avatar answered Oct 21 '22 07:10

ehmjaysee