I followed this link iPhone reachability checking but can anyone help me with if the user has not connected to internet how to take him to setting menu
3 Answers
If your application only supports iOS 5 and below target version then you can use below code to achieve this.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs://"]];
Please note that this is diable in iOS 5.1.

- 1,046
- 8
- 10
In iOS 5.0 and 5.0.1 you can use this:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs://"]];
However, in iOS 4.3 and older and in iOS 5.1 and later, this URL scheme is not associated with the Settings app - if you want your app to be accepted in the AppStore, you don't really have any option other than asking the user to go to Settings. However, if jailbroken/non-AppStore development is an alternative, you can use a private function for opening an app:
SBSLaunchApplicationWithIdentifier(CFSTR("com.apple.preferences"), false);
This function is located in the SpringBoardServices private framework.
-
int result =SBSLaunchApplicationWithIdentifier(CFSTR("com.apple.preferences"), false);if (result == 1) { NSLog(@"%@",(NSString*)SBSApplicationLaunchingErrorString(result)); } this is give error "SpringBoard is not running" and app is not going to launch. – priyanka May 03 '13 at 09:21
-
@priyanka That's the risk of using a private API. – May 03 '13 at 09:25
-
Ya that's true but we don't want to upload this app on AppStore. can you please how to launch the other application form my application. – priyanka May 03 '13 at 09:31
-
@priyanka I don't know. This time **you** will have to do some research. – May 03 '13 at 09:33
I should make a NSTimer within you appdelegate which loops (for example each 30 seconds). When this method is fired (on every 30 seconds) you check for the current internet connection. If this connection fails then you navigate to the settingsviewcontroller else you do nothing.

- 1,806
- 2
- 25
- 41