iOS Question Database location

aaronk

Well-Known Member
Licensed User
Longtime User
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:
B4X:
#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 ?
 

David Martinez

Member
Licensed User
Longtime User
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.


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:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…