This is probably something really simple that I am missing, why when using the code below to access settings does the default value return as (null)
- (void)updateUIForDistanceUnits {
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
NSString *test = [userDefaults stringForKey:@"IDDistance"];
NSLog(@"DISTANCE: %@", test);
}
Root.plist

The default value in
Root.plistis just what the UI shows if there’s no value set, and you have to do the same in your code or set up[NSUserDefaults -registerDefaults]correctly in your application.You should find that once you set the value in Settings.app
NSUserDefaultswill return the correct value.