iOS Question read-only sqlite db: does it still need to be copied out to documents

MikeS

Member
Hello. I am evaluating, and I understand it's needed to copy out sqlite db file from DirAssets file to DirDocuments folder prior to initialization. I can understand why that's needed for writeable db file, but for a read-only file, is it still necessary (i.e. can the file be opened/initialised within the DirAssets)? I ask since it's possible in objectiveC to open a read-only database in an application’s bundle. As I have a rather large db, so I want to avoid duplicating this file if possible. Thanks.
 

MikeS

Member
Thanks. I understand the impact is minor (e.g. startup speed) but if I have a reasonably large db file of 5Mb, then the user will have another 5Mb consumed. It seems a little inefficient or redundant if there is a way around it. I guess on iOS maybe the user may not easily see this inefficiency, but I am concerned on Android where the user can easily see resource usage, and view the app unfavourably. When you mention about the check workaround, do you mean it's possible to use a NativeObject to perform the db open and pass a db handle back to the B4i environment?
 
Last edited:
Upvote 0
Top