Call the official *Settings* app from my app on iPhone

后端 未结 9 772
名媛妹妹
名媛妹妹 2020-11-28 23:51

At one point in my app, I would like to redirect the user to the official Settings app. If possible, I also want go straight to the Network section within

相关标签:
9条回答
  • 2020-11-29 00:32

    It's also work in iOS version > 5.1, but you must add an URL schemes in URL types in Xcode:

    enter image description here

    Then you can use

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]];
    

    It's can open system WiFi setting now.

    Other path please find in this answer: iOS Launching Settings -> Restrictions URL Scheme.

    0 讨论(0)
  • 2020-11-29 00:33

    from iOS 8, you can redirect with

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

    enjoy coding

    0 讨论(0)
  • 2020-11-29 00:34

    For iOS 10 you can use:

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"App-Prefs:root=Settings"]];
    

    It is also working on iOS 9!

    0 讨论(0)
提交回复
热议问题