Frage

Future thinking here, if I was to create A .Plist files that saves data to my app to benefit users will this be overwritten if lets say I updated the app a few weeks later or am I fine to not worry. If not I was thinking maybe I could create the Plist programmatically to check if there is already a Plist created if this would be the way to go how would I go about creating a Plist programmatically?

Any other suggestions are welcome, thanks.

War es hilfreich?

Lösung

Documents directory will not be removed during an app update so your file will be there. However the app bundle will be replaced by the new bundle. But if your code copy the Plist from bundle to Document directory then it will be overwrite so you can put your logic for reading the data or updating the file!

Andere Tipps

Files released with the app are in the resources of the app bundle. These will be overwritten. But the user can't edit them anyway.

Usually you would copy whatever resources the user needed to edit / maintain from the app resources into the documents folder. Once they are there your code is in control (documents are not overwritten).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top