GLBasic forum

Main forum => GLBasic - en => Topic started by: Leginus on 2011-Mar-09

Title: App Updates
Post by: Leginus on 2011-Mar-09
As I have not actually updated any apps on the app store, I wondered if I could delve into the experience of others that may have.

If you have an ini file, or data file, which stores level data (e.g. Your current level is level 45), will this be overwritten when an app is updated, or does the update only overwrite files that are changed, or can I specify?

I would test the theory myself, but I didnt want to force my customers to have to update the app just so i could test a theory.

Thanks in advance
Title: Re: App Updates
Post by: Ian Price on 2011-Mar-09
Any data that you have saved (in the correct folder) is preserved when you update an app.

It would piss me off severely if this wasn't the case - so many games update so often that you'd never finish them! :P
Title: Re: App Updates
Post by: Leginus on 2011-Mar-09
phew!!  cheers Ian.    :enc:
Title: Re: App Updates
Post by: Wampus on 2011-Mar-09
Ian, when you say correct folder, you mean somewhere in the Documents folder, yes?

I'm a little worried about players potentially losing their scores, achievements and unlocked game-modes after updates or some other disruption. I've come to the conclusion that as well as saving data in the Documents folder its useful to have player information on the cloud somewhere so it can be synced in the case of data loss on the local device.
Title: Re: App Updates
Post by: Ian Price on 2011-Mar-09
No need to worry about losing your data when you update. I tested that with B'lox! - all played levels gave me my records when I updated. And that has 120 levels.

You can only save data correctly to the one folder (on a non-JB'd iThing), so if it works in the original version it will in any update.
Title: Re: App Updates
Post by: Leginus on 2011-Mar-09
Sorry Ian, just another quick question.  Was this a datafile you created once the game was installed (within the code), or was it an inifile that installed with the game package and was then updated from within the game.
Title: Re: App Updates
Post by: XanthorXIII on 2011-Mar-09
Yes I can confirm that this worked when I updated Ian's app to the newest version. I would have cried if everything was reset to 0.
Good thing it wasn't.  =D
Title: Re: App Updates
Post by: Ian Price on 2011-Mar-09
QuoteSorry Ian, just another quick question.  Was this a datafile you created once the game was installed (within the code), or was it an inifile that installed with the game package and was then updated from within the game.
I created the file from the app. When B'lox! is run it checks for a save file - if one doesn't exist then it creates one for future use. There's no way to create a save file that can be appended/amended/altered in the standard app - you have to save to the "Documents" folder. Any other location is read-only.
Title: Re: App Updates
Post by: Leginus on 2011-Mar-10
Thanks for you answer.

However, on BumbleBomber the ini was installed with the app and it is read and write.
The first time you open the app it is set to Tutorial  = 1 and once viewed it becomes Tutorial = 0.

Your advice answered the question though, as if I used this method for anything else it will be overwritten on the update and will be lost, so creation from the app it is (for scores and levels).

Title: Re: App Updates
Post by: Leginus on 2011-Mar-10
ignore that response, its late and i have just read what you ACTUALLY put and realised I'm a tired pillock :)
Title: Re: App Updates
Post by: Ian Price on 2011-Mar-10
We've all been there! :)

BTW as mentioned previously this is for non--jailbreaked iThings. JB'd can save anywhere IIRC.