I'm working on a game and all progress the user makes will be saved with NSUserDefaults. Is it a good or bad idea???
What are the chances of losing the game saved? Is there a better way to do this?
When the user syncs the device, iTunes will backup NSUserDefaults? So in case the user changes his device he will not lose the progress, he just has to sync the device with iTunes? How safe is it?
GameCenter achievements will be saved with NSUserDefaults as well, in case the user doesn't have an internet connection at the time.
Well, I just wanna know your opinion/experience. All code is working flawless, but I'm afraid the player might lose his progress for some reason.
If anyone wants more details on the code fell free to ask, I can post it here.
Thanks!
NSUserDefaults
are synced to iTunes if the user syncs the app. The data is safe as long as the user does not delete the game.
If you need to preserve the data even after the user deletes the game, you may consider saving the data somewhere else (say, Dropbox, own server, etc.)
In my opinion, NSUserDefaults is perfectly safe. The contents are even maintained after a version update of the app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With