Question

I'd like to know if there is a way of checking whether the values set in my Settings.bundle are default values, and if they are, give a warning.

Would I be correct in doing this

‑(void)ViewDidLoad {
   if ([[NSUserDefaults standardUserDefaults] stringForKey:@"textEntry_key"] == @"" ||[[NSUserDefaults standardUserDefaults] stringForKey:@"textEntry_key2"] == @"") {
      UIAlertView *settings = [[UIAlertView alloc] initWithTitle=@"Configuration Error" message=@"Default values present in application settings. Please configure." delegate=self cancelbuttontitle = nil otherbuttontitles=@"Configure", nil];
      [settings show];
      [settings release];
   }

What I don't know to do from here is to link that button (Configure - otherbuttontitles) to the application configuration in settings.app.

Thanks :)

Was it helpful?

Solution

I don't believe that Settings.app has a URL scheme available to launch it. This would mean that you cannot link your "Configure" button to Settings.app. If you absolutely must have the user configure some settings before being able to use your app, you may want to consider providing an interface to edit the settings from within the app using NSUserDefaults.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top