aaronk Well-Known Member Licensed User Longtime User Jan 10, 2016 #1 Hi, I have been reading the tutorial: https://www.b4x.com/android/forum/threads/files-and-folders.46137/ I am planning on storing a local database (.db file) on the device and don't want the user to access this database in iTunes. I also plan to add a log file (.txt file) so the user can access this file in iTunes. Looking at the tutorial it says: File.DirDocuments can be shared through iTunes. In order to enable this feature you need to add this attribute: Code: Code: Copy #PlistExtra: <key>UIFileSharingEnabled</key><true/> Since I want the log file to be accessible, I guess this file needs to be placed in File.DirDocuments. However, where should I save my database file? I don't want this database to be deleted when the app gets updated. I am guessing this database needs to be placed in File.DirLibrary ?
Hi, I have been reading the tutorial: https://www.b4x.com/android/forum/threads/files-and-folders.46137/ I am planning on storing a local database (.db file) on the device and don't want the user to access this database in iTunes. I also plan to add a log file (.txt file) so the user can access this file in iTunes. Looking at the tutorial it says: File.DirDocuments can be shared through iTunes. In order to enable this feature you need to add this attribute: Code: Code: Copy #PlistExtra: <key>UIFileSharingEnabled</key><true/> Since I want the log file to be accessible, I guess this file needs to be placed in File.DirDocuments. However, where should I save my database file? I don't want this database to be deleted when the app gets updated. I am guessing this database needs to be placed in File.DirLibrary ?
Erel B4X founder Staff member Licensed User Longtime User Jan 10, 2016 #2 Yes, in File.DirLibrary. Upvote 0
David Martinez Member Licensed User Longtime User Apr 25, 2016 #3 I just read this iOS Data Storage Guideline. After the user stores a lot of data in their database, that new data is cannot be reproduced by code and is very important to them. A backup would be great. I believe it should be stored in Documents. Please clarify. Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application, should be stored in the <Application_Home>/Documents directory and will be automatically backed up by iCloud. Data that can be downloaded again or regenerated should be stored in the <Application_Home>/Library/Caches directory. Examples of files you should put in the Caches directory include database cache files and downloadable content, such as that used by magazine, newspaper, and map applications. Click to expand... Edit: I did see that the developer above did not want the user to access the DB. I don't mind if they do. Last edited: Apr 25, 2016 Upvote 0
I just read this iOS Data Storage Guideline. After the user stores a lot of data in their database, that new data is cannot be reproduced by code and is very important to them. A backup would be great. I believe it should be stored in Documents. Please clarify. Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application, should be stored in the <Application_Home>/Documents directory and will be automatically backed up by iCloud. Data that can be downloaded again or regenerated should be stored in the <Application_Home>/Library/Caches directory. Examples of files you should put in the Caches directory include database cache files and downloadable content, such as that used by magazine, newspaper, and map applications. Click to expand... Edit: I did see that the developer above did not want the user to access the DB. I don't mind if they do.
Erel B4X founder Staff member Licensed User Longtime User Apr 26, 2016 #4 Please start a new thread for your question. Upvote 0