SQLite DB not being installed

I don’t see this as something AppStudio can do. We can’t control if people add a version table to their database, so it’s best left to the user.

I am not even close to being an expert on this topic. If I understand correctly, if I am using AppStudio and I need use the sqlite plugin, then the entry in extrafiles is not relevant to me since NSB.overwriteNever, NSB.overwriteIfVersionDifferent, and NSB.overwriteIfVersionSame will not be able to read a version?

If I make the assumption that all my builds for iOS native apps and Andriod native apps will be using the plugin, what method/syntax should be used to install a blank database initially if one is not present, and then never overwrite the database once the app has been used the first time. (that is what overwriteNever does).

For me, I don’t care about the version, I need to include a database with my app, have it install when the app is installed and then NEVER be overwritten at startup.

What is the best way to accomplish this in AppStudio?

Apparently lots of other developers (21,486 plugin downloads/week) think SQLite is a viable path too…

Thank you

Thinking about this a bit, it is possible to run a query to see if any tables have been set up in the database yet. If there are no tables, then it’s a new database which can be populated if overwriteNever is specified.

SELECT name FROM sqlite_master 
WHERE type = 'table' 
AND name NOT LIKE 'sqlite_%';

If nothing gets returned, there are no tables.

Sound reasonable?

Yes, that seems reasonable, thank you for getting me pointed in the right direction.

I appreciate your help in working through this issue!