supose I have an app that I know I´ll be making tons of possible future new features updates!
So what is the best way to create a save system that in case player customers that have played the game ALOT and have unlocked new weapons and ships , and decide to update to a new version won´t lose their older unlocked features?
I was reading about using XML files but will Apple accept it?
Any hints? ![]()
PlayerPrefs?
Yeah, PlayerPrefs will probably persist when a user updates to a newer version. Though I’m not sure what will happen if the user uninstalls your app first before downloading a new version.
You can also try simple text file I/O using System.IO.StreamWriter and System.IO.File.ReadAllText().
You can safely write files to the Documents folder in an iOS device:
// Your game has read+write access to /var/mobile/Applications/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/Documents
// Application.dataPath returns
// /var/mobile/Applications/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/myappname.app/Data
// Strip "/Data" from path
string path = Application.dataPath.Substring (0, Application.dataPath.Length - 5);
// Strip application name
path = path.Substring(0, path.LastIndexOf('/'));
docPath = path + "/Documents";
We put stuff in the ~/Library/Application Support/, but there are a few different places you can safely store things:
Thanks for the answers guys !
You are my heroes!!
I think I am going to try a PlayerPrefs first because as I can see if you go to other device like on the UNION program we have a few posts saying that PlayerPrefs is the best “compatible” way to do the data storage/access data. But I´ll try the code and the location reference you gave me to test with a Text file!
Thank you for your time to answer my question my developer friends!