3

Quite similar question but not really the same question: Opening the Settings app from another app That question is about the Settings application of the iOS and not about opening your project's 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 then again, this code merely opens up your Settings and not your app's settings. I know it's 100% possible because I have tried it on the app called Foursquare. If you give NEVER to Foursquare's Location Settings, it will generate an alert which can redirect you to its own settings in the Settings app.

This is exactly what I need to do. I've been reading several questions for now, but I believe I couldn't find any similar questions to mine.

Also, I have already tried adding my app name to the URL string, like so, but didn't work:

UIApplication.shared.openURL(URL(string:"App-Prefs:root=MY_APP_NAME")!)
Community
  • 1
  • 1
Glenn Posadas
  • 12,555
  • 6
  • 54
  • 95

0 Answers0