ratkevich ratkevich - 1 year ago 478
iOS Question

UIApplicationOpenSettingsURLString not work in iOS 10

In iOS 10, do not open settings url:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];

What is the problem?

Answer Source

I did like that and it's works. I'm test it today!

 NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
 [[UIApplication sharedApplication] openURL:url];

Swift 3:

let urlObj = NSURL.init(string:UIApplicationOpenSettingsURLString)
if #available(iOS 10.0, *) {
    UIApplication.shared.open(urlObj as! URL, options: [ : ], completionHandler: { Success in

} else {
      //fallbacks for previous versions                              
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download