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

后端 未结 9 804
名媛妹妹
名媛妹妹 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:08

    Just an additional answer to add onto the one's addressing iOS8+. If you're supporting anything below 8, you should check to see if it's supported

    BOOL canGoToSettings = (UIApplicationOpenSettingsURLString != NULL);
    if (canGoToSettings)
    {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
    }
    

提交回复
热议问题