title: OS X: NSUserDefaults not saved
body: <p>I have a sandboxed app for OSX and I saved some data in <code>NSUserDefaults</code>, everything was fine until I deleted the plist file from the <strong>~Library/Preferences/</strong> directory. </p>
  
  <p>I thought the app should recreat it but it did not. When I debug I see that </p>
  
  <p><code>[[NSUserDefaults standardUserDefaults] synchronize]</code> method returns <code>YES</code> </p>
  
  <p>and data are saved in the class but when I restart the app user defaults is empty.</p>
  
  <p>Even if I copy those plist file from backup to the Preferences directory, the app does not see it.</p>
  
  <p>Of course the plist should be saved in the Containers/my app bundle id/Data/Library/Preferences and when I copy the plist file from backup to that directory, the app can see it, but why that file is not recreated when I deleted it?</p>
  
  <p>Does anybody know why is that?</p>