★ TouchArcade needs your help. Click here to support us on Patreon.

Why do updates kill user data?

03-10-2009, 08:40 PM
#1
Joined: Feb 2009
Location: San Jose, CA
Posts: 546
Why do updates kill user data?

I noticed a ton of updates kill user data -- is this just an unfortunate side effect of updating that can't be overcome?

I can understand if the game is updated in such a way that the old data isn't really relevant, or keeping the old data / scores doesn't make sense because the scoring can't be compared to the new version.

However, I'd try everything I could to preserve my user's data at all costs, which leads me to believe that this loss of data is not the developer's fault.

Does anyone have any insight? The latest example I've heard of is Zombieville USA, which apparently erases the scores / records after the update.
03-10-2009, 09:31 PM
#2
Joined: Dec 2008
Location: Indiana, USA
Posts: 4,044
I would say that's game dependent. I've had plenty of games that have survived updates just fine, and in fact can't think of one that's lost data. Of course, as long as my save games are in tact I don't tend to pay too much attention to anything else.

Eric Pankoke
Mobile Games Reviewer: Rusty Sabre, TouchMyApps
Blog: iPhone Life
Twitter: RustySabre

03-10-2009, 09:33 PM
#3
If an app loses data after an update, that's entirely the developer's fault.

There's no data loss expected from the upgrade itself.

Didev Studios || Twitter || YouTube || Facebook
Releases
GeoSnake || Bugz || Review Scraper (Open Source)
03-10-2009, 11:11 PM
#4
As a developer, how would I ensure high scores/user data doesn't get wiped during an update? If I were to create a plist with user data from scratch once the app was run for the first time, would that work? How does the update process work? Will it just overlay files onto the existing app directory? or does it delete the current app's folder first?
03-10-2009, 11:44 PM
#5
Joined: Jan 2009
Posts: 1,553
Puzzlequest still carries my data after multiple updates, zombieville usa is one of the only games which has cleared my top score after an update but it has a valid reason, the game is much better and slightly different now.

3D modelling, design and sequential artist / GameCenter ID: Diab
03-11-2009, 12:00 AM
#6
Joined: Feb 2009
Location: San Jose, CA
Posts: 546
Quote:
Originally Posted by lithiastudios View Post
As a developer, how would I ensure high scores/user data doesn't get wiped during an update? If I were to create a plist with user data from scratch once the app was run for the first time, would that work? How does the update process work? Will it just overlay files onto the existing app directory? or does it delete the current app's folder first?
I had/have the same question too. That's exactly why I thought the updates were causing my data to be lost -- that the save was simply being overwritten.
Good to hear that's not the case, and that data can be preserved. I've seen the issue so far with Zombieville / Creeps!, and it's made me hesitant to upgrade a few of my other apps.

If anyone has information about what exactly happens during an update I'd be interested to hear it; in the meantime, I'll do some digging myself.
03-11-2009, 02:11 AM
#7
Quote:
Originally Posted by InsertWittyName View Post
If an app loses data after an update, that's entirely the developer's fault.

There's no data loss expected from the upgrade itself.
Not entirely true. The first couple months the App Store was open, Apple had a random update bug that wiped all user data when the update happened. You'd see the bug pop up all the time in various app user reviews, and the dev would get the blame, when really, it all happened before the app was ever launched. However, nowadays the bug happens rarely. But it's always a fear in the back of our minds.
03-11-2009, 02:17 AM
#8
Quote:
Originally Posted by lazypeon View Post
If anyone has information about what exactly happens during an update I'd be interested to hear it; in the meantime, I'll do some digging myself.
If everything goes according to plan, Apple overwrites everything except the data in the app's Documents directory. This is generally where devs store local user data. During this whole process, the app is not started, which means the dev has zero control over anything. Once the app is launched the first time, it's up to the dev to read the user data correctly.
03-11-2009, 09:34 AM
#9
Joined: Feb 2009
Location: San Jose, CA
Posts: 546
Ah perfect -- exactly the type of info I was looking for. Thanks!

Quote:
Originally Posted by Little White Bear Studios View Post
If everything goes according to plan, Apple overwrites everything except the data in the app's Documents directory. This is generally where devs store local user data. During this whole process, the app is not started, which means the dev has zero control over anything. Once the app is launched the first time, it's up to the dev to read the user data correctly.
03-12-2009, 02:27 AM
#10
Joined: Sep 2008
Location: Birmingham, UK, dull corner of the world
Posts: 2,367
Quote:
Originally Posted by Little White Bear Studios View Post
If everything goes according to plan, Apple overwrites everything except the data in the app's Documents directory. This is generally where devs store local user data. During this whole process, the app is not started, which means the dev has zero control over anything. Once the app is launched the first time, it's up to the dev to read the user data correctly.
So if we want the update to continue reading the old data, we'd keep the reference (dictionary name for example) the same, but if we actually want the update to start over, we'd change the reference name so it won't load the old one, right?