I am developing an iPhone application, I encounter a problem on the iOS4 because of multi task.
This application has the default settings defined in a Settings.bundle. I
I had the same problem as you, and got around it by calling
[[NSUserDefaults standardUserDefaults] synchronize];
in applicationDidBecomeActive
.
For some reason the [NSUserDefaults standardUserDefaults]
object you can access in your app isn't synchronized with the actual plist files backing it when an app becomes active again after having been suspended. Calling the synchronize
method forces a synchronization.