BASIC

Author Topic: IPhone game update, prevent data loss?  (Read 2124 times)

Offline Ozden79

  • Mr. Polyvector
  • ***
  • Posts: 121
    • View Profile
Hello Guys,

Still not released his first game for IPhone :) but this is something that I read a lot on game reviews that updates are caused loss of current game progress, etc. so I want to prevent this from the beginning. As default to GLBasic, I use "Media" folder for all my data location. I'll create an ini file at there, which won't be available at first deployment, to keep the game progress, etc. Will this guarantee that my ini file will be still there when the user updates it's game or an update means completely deleting all folders of old installation and make a fresh one?

Would appreciate if somebody has any experience about this and gives a reply...

Özden

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10683
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: IPhone game update, prevent data loss?
« Reply #1 on: 2010-Jan-28 »
You can't write to MEdia on the iPhone.
Write to PLATFORMINFO$("DOCUMENTS") and it will stay there even after an software update. iTunes will sync this directory, too IIRC.

Offline Ozden79

  • Mr. Polyvector
  • ***
  • Posts: 121
    • View Profile
Re: IPhone game update, prevent data loss?
« Reply #2 on: 2010-Jan-28 »
Thank you, I'll follow that route...

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
Re: IPhone game update, prevent data loss?
« Reply #3 on: 2010-Mar-05 »
On the iphone, does the PLATFORMINFO$("DOCUMENTS") return a folder that is only accessible to the running glbasic app? Or do other apps also write into this folder, just like the "my documents" folder in windows?

And also, can you create subfolders in this documents-folder using CREATEDIR()? I don't have an iPhone (yet) so I was wondering.

Offline Ozden79

  • Mr. Polyvector
  • ***
  • Posts: 121
    • View Profile
Re: IPhone game update, prevent data loss?
« Reply #4 on: 2010-Mar-06 »
I haven't tried folder creation but I can confirm that it's only allowed to reach the file who has created the file, other apps cannot.

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: IPhone game update, prevent data loss?
« Reply #5 on: 2010-Mar-06 »
DOCUMENTS on iPhone returns the Path to Sandbox directory of your game. every game has a tmp folder, a documents folder and the own .app folder.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC