问题
I currently have an application that requires the user to maintain a VPN tunnel. On load I check if the VPN tunnel is available.
I am wondering if there is any way for me to display an UIAlertView
which on clicking "OK" takes the user to the iPhone main settings screen, so they can turn on VPN.
I know how to store app specific settings and that seem to be the most common articles out there, but is there any way to get your app to redirect the user to the main iPhone settings page?
回答1:
As said, there's no way to do this currently. You'll have to create your own settings screen inside your app.
See a similar thread here:
How do I open the Settings application from my application?
回答2:
iPhone has it's own NSURL protocols for apps, such as youtube:, mail:, etc. Judging by the "Airplane Mode" alert, there is clearly one for the Settings app. I imagine it is open, but don't know what the syntax would be off the top of my head. Check the docs about the protocols.
来源:https://stackoverflow.com/questions/3178573/how-to-send-a-user-to-the-main-iphone-settings-screen-from-within-your-iphone-ap