07-02-2013 09:31 AM
I've just read the documentation 'File system access for apps' but I'm still comfused with how json files are working on BB10 :
Imagine my app provides an original json with some datas in it.
The user can add datas too.
What if I package a new version of my app with new datas added compared with the original json ?
Thanks for your help,
07-02-2013 09:40 AM
The very first time that you user use your app, you must move your json file from your app to a Read/Write directory if you plan the user update the file. After that, if your deply a new version with new data in your json file you have to check if the user have a r/w json file so you have to do somw kind of synchronization between the two files to keep the changes the user did.
07-02-2013 09:52 AM
Sorry,do not have an example but the idea is to check what you have in one file and then add/update in the other one.
You can use a special flag to mark those "records" that changed in the original file and then update the file in the user path accordingly.