NSUserDefaults and sandboxing under Lion
问题 Moving one of my projects to support sandboxing as per Apple's requirements. I use UserDefaults like so: [[NSUserDefaults standardUserDefaults] setObject:@(myNumber) forKey:myNumberKey]; [[NSUserDefaults standardUserDefaults] synchronize]; Everything works as expected until I enable sandboxing. If I have sandboxing enabled the app creates a lock file in it's sandbox directory ( .plist.lockfile) and doesn't create an actual .plist file. What am I doing wrong and how do I store my settings in