title: NSUserDefaults standardUserDefaults setInteger for a long long int
body: <p>I'm trying to create a high score system in my iPhone app that allows me to store a long long int in the High Score save file, because I am expecting the high score values to be greater that a normal integer. But all I could find in terms of code was this: </p>
  
  <pre><code>   if (ScoreNumber &gt; HighScore) {
      HighScore = ScoreNumber;
      [[NSUserDefaults standardUserDefaults] setInteger:HighScore forKey:@"HighScoreSaved"];
  }
  </code></pre>
  
  <p>The HighScoreSaved won't save correctly, once the Score Number achieves a value greater than 2,147,483,647 or the maximum integer value for a 4 byte integer, the HighScoreSaved will save a completely different integer value. Here is what I have in my ViewController.h in terms of data types:</p>
  
  <pre><code>    int y, RandomPosition;
      long long int ScoreNumber, HighScore;
      BOOL Start;
  </code></pre>
  
  <p>Just to reiterate and make sure I'm as clear as possible, I'm looking for a way to store a long long int high score value in objective-c. Any input would be much appreciated and this question may seem foolish but this is my first app using xcode and objective-c, so anything would be good. Thanks.</p>