suppose i am playing a game on iphone, then press home button (multi-task) and update my game from app store. after update, i press the game icon to start again, will this game start from the very beginning (like a new-installed app) or just from where i was playing?
if it starts from the beginning, everything will be fine, but if it continues to play from where i was playing, it would cause trouble (still using old game settings : old AI, old score etc.)
thank you.
Your app will completely quit, the new app will be installed, and you will launch the updated app fresh.
But! While the code and assets of you app are updated, any stored data is kept. Anything in
NSUserDefaultsor files in the the apps documents directly, or (obviously) any data on remote servers, wont be reset.Apps have to be ok with being shutdown anyway. Regardless of an app update or not, the app need to be able to start from scratch and be able to set itself back up however you want it to.
So save preferences, or other user generated data, in a place that won’t be wiped and the updated app will read all that back in and you can use it to set the initial state of your app however you want.