I have an app that uses [NSUserDefaults standardUserDefaults] to store session information. Generally, this information is checked on app launch, and updated on app exit. I
I faced the same issue. I solved it by calling
[[NSUserDefaults standardUserDefaults] synchronize];
before calling
[[NSUserDefaults standardUserDefaults] stringForKey:@"my_key"].
[[NSUserDefaults standardUserDefaults] stringForKey:@"my_key"]
It turns out one has to call synchronize not only after setting but before getting too.
synchronize