Open your iOS app settings

Quite a similar question, but not exactly the same question: Opening the settings app from another app This question is about the iOS Settings app, not about opening your project settings on your phone.

Now, in iOS 10.x, it works for me:

if UIApplication.shared.canOpenURL(URL(string:"App-Prefs:root")!) {
UIApplication.shared.openURL(URL(string:"App-Prefs:root")!)
} else {
UIApplication.shared.openURL(URL(string:"prefs:root")!)
}

      

But again, this code just opens your Settings , not your application's settings. I know it is 100% possible because I tried it on an app called Foursquare . If you give NEVER Location Settings to Foursquare , it will generate an alert that can redirect you to your own settings in the Settings app .

This is exactly what I need to do. I've read a few questions at this point, but I believe I couldn't find any similar questions.

Also, I already tried to add the app name to the url string, for example, but didn't work:

UIApplication.shared.openURL(URL(string:"App-Prefs:root=MY_APP_NAME")!)

      

+3


source to share





All Articles