How to send a user to the main iPhone Settings screen from within your iPhone App

瘦欲@ 提交于 2019-12-08 00:21:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!