1
votes

I have prepared a "Settings.bundle" file that contains plist with properties. However, after I compile and load the app, I can't find the those properties in [NSUserDefaults standardUserDefaults]. After I go to the settings and modify the properties there, all the modified properties can be found in [NSUserDefaults standardUserDefaults] (the unmodified ones are still missing). Is this a known problem in iOS 4.2? I tried the same program in iOS 3.2 and it was ok.

1
See the answer from user pwc in stackoverflow.com/questions/4675877/… - user8472

1 Answers

1
votes

I wrote a library that duplicates the settings from setting.bundle inside the app, during that I discovered that the defaults in setting.bundle are not registered unless the user goes to the app's settings in the settings app. Here's the function I wrote that goes though the all the plists in the settings.bundle and registers the user defaults: http://bitbucket.org/keegan3d/inappsettings/src/2053acd0524e/InAppSettings/InAppSettingsReader.m

I'm not sure why it's working in iOS 3.2 for you but it might be that the settings are registered from a previous build.