NSUserDefaults not present on first run on simulator

Posted by Ben Collins on Stack Overflow See other posts from Stack Overflow or by Ben Collins
Published on 2010-05-08T04:31:00Z Indexed on 2010/05/08 4:38 UTC
Read the original article Hit count: 392

Filed under:
|

I've got some settings saved in my Settings.bundle, and I try to use them in application:didFinishLaunchingWithOptions, but on a first run on the simulator accessing objects by key always returns nil (or 0 in the case of ints). Once I go to the settings screen and then exit, they work fine for every run thereafter.

What's going on? Isn't the point of using default values in the Settings.bundle to be able to use them without requiring the user to enter them first?

© Stack Overflow or respective owner

Related posts about nsuserdefaults

Related posts about iphone