save data of the app, and not loose them if i update the app
if i have a local data of an app, suppose a local highscore where i store all my score of the game.
if i release an update of the app, i loose all data.
i save data with this method:
there is a way that save the data "permanently" not to loose when i reinstall, or update the app?
thanks
if i release an update of the app, i loose all data.
i save data with this method:
Code:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *filename = [documentsDirectory stringByAppendingPathComponent:@"defaultStage.dat"];
char cstr[512]={0};
[filename getCString:cstr maxLength:512 encoding:NSASCIIStringEncoding];
defaultStage=1;
FILE *pFile=fopen(cstr, "wb");
//and save with fprintfthanks
the documents directory shouldn't be being deleted on app update...
thanks for response, i'll double check next time i'll update the app
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| can photoshop save a png with only alpha channel? | sefiroths | 8 | 8,833 |
Jan 20, 2011 01:49 AM Last Post: sefiroths |
|
| Crash during file save | Coin | 4 | 3,453 |
Mar 29, 2005 05:39 PM Last Post: maaaaark |
|

