简体   繁体   中英

How do I move to iPhone settings from an app

我创建了一个应用程序,当用户单击 twitter 同步按钮时,它会在手机设置中显示一个 twitter 帐户的操作表如果没有任何帐户,它会显示一个警报视图。我如何移动到手机设置(专门创建 twitter 帐户)从单击该警报 OK 按钮

Apple does not allow doing that via code. You need to popup a dialog and request user to do this manually. Not nice, I know...

It used to be possible, but Apple has now blocked it. More details at iOS Launching Settings -> Restrictions URL Scheme

Jumping to the settings app using a custom url scheme happened to work prior to iOS5.1, but was never officially supported. I've filed a DTS to get an official answer.

Thank you for your inquiry to Apple Worldwide Developer Technical Support. I am responding to let you know that I have received your request for technical assistance.

The URL scheme to launch Settings app or to a certain screen in Settings has never been documented nor supported. Staring with iOS 5.1, Apple has removed support for linked-to system preferences in iOS 5.1, the same with iOS 6.0

If you want URL access support to Settings, please file a bug report to "http://bugreporter.apple.com".

You can use this on iOS 5.0:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs://"]];

But now moving to settings app is no more supported from application. you need to write custom message and alert user to go to setting and make particular thing enabled on/off.

Hope this info helps you..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM