2

I want to move from my app to settings screen of iphone when a button in the app is pressed. Can any one please help by telling how to do it? Any help is appreciated. Sorry for my bad english.

Thanks

Kiron
  • 268
  • 5
  • 18
  • You've added the tags iOS 5 and iOS 4, and there is not way to do this on both. The answer stated below is accurate, but this feature was added for iOS 5.0, and disallowed for 5.1. – Mick MacCallum May 11 '12 at 09:57

4 Answers4

12

prefs:root=General pattern no longer works for iOS Latest versions !!!

There is an update in it. The following works fine in iOS 8 ..

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
Karan Alangat
  • 1,886
  • 2
  • 23
  • 55
5
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General"]];

you may look at this

iOS Launching Settings -> Restrictions URL Scheme

Community
  • 1
  • 1
adali
  • 5,909
  • 2
  • 31
  • 39
2

Settings screen can be opened for versions less than IOS 5.0 as it has been disabled for latest IOS's. For Lower versions you can try this:

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

MoreOver you should create your own view and present the editable settings to the user and get the input from him(for the first time or as a menu) and store it using NSUserdefaults.

You can't ask user to enter settings such as server-address port etc and try it each time, if it works.

NetVicious
  • 3,258
  • 1
  • 29
  • 44
Abhishek Singh
  • 5,990
  • 1
  • 20
  • 25
0

I have found a solution for navigating from your application to Settings application which works fine iOS 8 or later versions

1) [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];

This will navigate to settings only if your app settings are absent if they are present then the above code will navigate to Settings page of your app

I am using the below string to navigate to iCloud page and it works fine

[[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"App-Prefs:root=CASTLE"] options:@{} completionHandler:nil]

just by replacing the "CASTLE" with "GENERAL"

Sangram Shivankar
  • 3,245
  • 3
  • 22
  • 36
Shaniraaj
  • 59
  • 9