title: `[NSUserDefaults standardUserDefaults]` returns nil
body: <p>I want to save some user preferences, but</p>
  
  <pre><code>NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  </code></pre>
  
  <p>just returns <code>nil</code>. </p>
  
  <p><a href="https://developer.apple.com/library/iOS/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html" rel="nofollow">iOS-Developper Library</a> says, that this should return the existing shared defaults object or create one if none exists... What am I missing? </p>
  
  <p>I also use <a href="https://github.com/arashpayan/appirater" rel="nofollow">Appirater</a> and there all this stuff seems also not to work...</p>
  
  <p>This code gets called when the user pushes a button...</p>
  
  <pre><code>NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  int index = ([defaults integerForKey:@"BackgroundColorSpecifier"]+ 1)%self.backgroundColors.count;
  [defaults setInteger:index forKey:@"BackgroundColorSpecifier"];
  [defaults synchronize];
  </code></pre>
  
  <p>This gets called in <code>application: didFinishLaunchingWithOptions:</code></p>
  
  <pre><code>NSUserDefaults *standardDefaults = [NSUserDefaults standardUserDefaults];
  [standardDefaults registerDefaults:@{@"BackgroundColorSpecifier": @0}];
  [standardDefaults synchronize];
  </code></pre>
  
  <p>When I debug this code snippets the green "position-indicator" jumps around in a very strange manner... </p>
  
  <p>I don't have any clue, whats going on... Please help!</p>