2

Anyone know if it's now feasible to launch the 'Settings' app from your app? Google Maps does it when you don't have Location Services enabled and you try to locate yourself.

I've seen lots of folks post about it and most answers point to adding a bug in Radar.

In the wild, I know of two apps that show this dialog with ""Turn on Location Services to Allow [app] to Determine Your Location" along side Cancel and Settings buttons where the 'Settings' button will take you to the General Settings.

1) Facebook app version 3.3.2 that runs on iOS 3.1.3 shows this alert on start. I looked at the three20 source code in git-hub but that project is not really a full source of the app but more of a library with the app's components.

2) GroupMe also shows the same alert when adding current location to a new message.

Stephan Keene
  • 539
  • 1
  • 5
  • 9
  • Check here: http://stackoverflow.com/questions/736047/programmatically-opening-the-settings-app-iphone Not possible by now. – Aemsn Jul 20 '11 at 20:03

2 Answers2

0

In iOS 5.0 you can open settings using the "prefs://" URL scheme. But in iOS 5.1 it doesn't work. But there is a trick I used for login twitter account using settings inside my app. the code is

TWTweetComposeViewController *tweetViewController = [[TWTweetComposeViewController alloc] init];

    // Create the completion handler block.
    [tweetViewController setCompletionHandler:^(TWTweetComposeViewControllerResult result)
     {
         [self dismissModalViewControllerAnimated:YES];
     }];
    // Present the tweet composition view controller modally.
    [self presentModalViewController:tweetViewController animated:YES];

    tweetViewController.view.hidden = YES;
    for (UIView *view in tweetViewController.view.subviews){
        [view removeFromSuperview];
    }

Using this code you can switch to settings from your app directly if you are not already logged in twitter account.

Nishant Tyagi
  • 9,893
  • 3
  • 40
  • 61
0

You mean the settings of the app like you see in settings?

First create a settings.bundle in xcode>newfile>settings.bundle. This will create some prop lists that you can edit from out of the Settings.app or your app self. For the exact code Google can help you a lot further that I can. If you have any specific questions; don't hesitate to ask.

BTZ
  • 23
  • 6
  • No - the main Settings app that shows 'Notifications', General, and all of the other system-wide settings. – Stephan Keene Jul 20 '11 at 20:05
  • I don't think its possible or desirable: If you want the user to change settings other than your own app's settings you should put up a message directing the user what to do in the settings.app. – BTZ Jul 20 '11 at 20:25
  • Agreed about putting up a message. But I'm trying to bring them to the settings app because that'd make it slightly easier for the users. I've edited my original post to note about the Facebook app. – Stephan Keene Jul 20 '11 at 20:28