I was going to use
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
// to store
[defaults setObject:[NSNumber numberWithInt:level] forKey:@"level"];
[defaults setObject:[NSNumber numberWithInt:gamesplayed] forKey:@"games"];
[defaults synchronize];
to store the number of games/levels played for a game. I wondered if these will get lost if I end up putting in an update to the app at some point? Where the use would be forced to start from the beginning again?
Basically is this how I should be storing this data? or is there another way? I want to be able to recall data stored locally about the user. I know I could go through mysql/webservices etc, but figured I don’t need to go through all that for this?
No, but they will be lost if the user deletes the application and then reinstalls it, and their progress won’t be available on any of their other devices.
For a game, I’d suggest using Game Center. For other types of application, I’d suggest iCloud.