Most sqlite examples I’ve found talk about creating a db file from the commandline first and then adding that to your app. For my project, I’d like to be able to create my database within the app when it starts up for the first time and then save it to a db file in the user’s sandbox. Is there a way to do that?
Most sqlite examples I’ve found talk about creating a db file from the commandline
Share
You can check for the file (as usual) when the application starts up. If the file does not exist, instead of copying the pre-created file, simply:
sqlite3_open()That’s really all there is to it.