Open general settings from App

Not sure whats the issue i am trying to open general setting from app so i use following code. But i notice the following code was working fine in sample application but not into my project where i want to implement


if let url = URL(string:UIApplication.openSettingsURLString) {

if UIApplication.shared.canOpenURL(url) {

UIApplication.shared.open(url, options: [:], completionHandler: nil)

}

}


any suggestions

Replies

Current state of affairs is that your app can only send the user to it's own settings, not the OS's own settings.

This question has been asked several times recently.

https://forums.developer.apple.com/thread/120205


All you can do is inform your user thet they will have to go from App settings to General settings.