Use presistence and you can save a whole array with it, it works like so:
NSUserDefaults is a singelton.
//Saving.
//Saves and object and assigns a key for retrival.
[[NSUserDefaults standardUserDefaults] setObject:myObject forKey:@"myObject"];
//Tells the userDefaults to update the data base.
[[NSUserDefaults standardUserDefaults] synchronize];
Note that the setObject may vary, if saving an integer it would be setInteger: forKey
//Retrieving Data.
id myObject = [[NSUserDefaults standardUserDefaults] objectForKey:@"myObject"];
Defaults is not a very fast system and not too powerful, mainly used to save small stuff, not recommended to use on saving game state and such.
Saving game score would be quite easy with this, and the item gets saved in local application data, so it's quick and easy to implement.
score (int):
`int myScore;
...... //myScore updates...
- (void)saveScore {
[[NSUserDefaults standardUserDefaults] setInteger:myScore forKey:@"score"];
//Note that the synchronize method can be called when exiting the app or such.
//I prefer sync whenever I update the database, but it's advised to save at//Application will terminate, //or use the Director in that case...
[[NSUserDefaults standardUserDefaults] synchronize];
}