URL for Settings>Privacy>Location Services in iOS 11+?
Asked Answered
H

2

12

If locationServicesEnabled() == 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+?

Hitandrun answered 4/9, 2017 at 8:4 Comment(3)
I am experiencing the same issueTogliatti
Did anybody get a work around ?Rabah
Still looking for a workaround. Can only open to main settings app with that URL :( I hope Apple still supports this :/Corroboree
R
1

I am experiencing the same issue since the first beta releases. I've tested a lot of different schemas but none of them worked properly. In the first releases opening schemas would redirect to the home screen but they already fixed that.

Rodriques answered 25/9, 2017 at 19:27 Comment(0)
T
0

Open Location Services: If this app is for personal use only and you do not plan to submit it to the App Store, then you should be ok to use the following. Otherwise, if you do plan to release your app, Apple will reject it upon review. Code is:

UIApplication.shared.open(URL(string: "App-prefs:LOCATION_SERVICES")!)
Thallus answered 3/11, 2022 at 12:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.