Search code examples
iphoneipadiossettingsapplication-settings

Why is this simple settings bundle not reading anything?


I have a settings bundle with the following settings. When I build/install my app the Settings.app appears to work correctly. I see the default value and everything. But in my app when trying to read the text field's text I get nil.

enter image description here

Here is how I read the settings

 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
 NSString *temp = [defaults stringForKey:@"url_preference"];

Solution

  • The defaults in the settings bundle are only read by the Settings app. See this question for details and workarounds.