1

Possible Duplicate:
Opening the Settings app from another app

Is there a way to direct the user to the Settings.app whenever I show a UIAlertView prompt? This prompt alerts the user that his location services is turned off and I want the user to open the Settings.app when he taps the button inside my UIAlertView.

UPDATE: I'm looking for a similar code stated here:

How to launch myapplication settings tab in settings app from my application in ipad

halfer
  • 19,824
  • 17
  • 99
  • 186
jaytrixz
  • 4,059
  • 7
  • 38
  • 57

1 Answers1

5

iOS 8 and iOS 9

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

There is no way to do this.

Because till now (11th Jan 2013) there is no url scheme available for settings app.

iOS 6

You can't do this on iOS 6.

iOS 5 and below (< iOS 5.1)

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General"]];

Please refer this answer for more info Call the official *Settings* app from my app on iPhone

Community
  • 1
  • 1
Midhun MP
  • 103,496
  • 31
  • 153
  • 200