Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open Twitter settings in Settings app

I know I can open the settings app in iOS 5 using

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

but is there a way to open the Twitter settings page directly? The desired functionality can be seen when you try to present a TWTweetComposeViewController and you have not set up a Twitter account.

like image 665
Andrew Avatar asked Oct 20 '11 23:10

Andrew


2 Answers

Try,

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];    
like image 183
Jorge Moreno Avatar answered Nov 15 '22 20:11

Jorge Moreno


I found out that the root value is the key of the localized string found in the "Settings.strings" file of the Preferences.app. Here are some values that I tested to work:

General: General
iCloud: CASTLE
Mail: ACCOUNT_SETTINGS
Twitter: TWITTER
Safari: Safari
Music: MUSIC
Video: VIDEO
Photos: Photos
Notes: NOTES
Store: STORE

However I can't figure out how to do this with my own app's settings.
prefs:root=Apps&path=<CFBundleDisplayName> seems not to work.

like image 21
Martin Hering Avatar answered Nov 15 '22 20:11

Martin Hering