open Location services to my app?

How i can open Location services direct to my app? I want it to go to the screen where the user chooses allow location or not can be enabled in the app..

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

this code open for me only the location services but how i can open location setting to my app?

Replies

Yes I know, but I want to get to the Location settings directly for my app

like this: Setting > Privacy & Security > Location Service > My app.

I want to get to the Location settings directly for my app

That screen is the closest you get. It is only one click away. Users will do the right thing once they click on that.