Am I right in thinking that your question was answered during our discussion in the ios - sqlite statement statement comments? Namely, we want to make sure that the database is included in the package (confirming the setting “Bundle Copy Resources” in Xcode for your target “Build Phase”) and that you want your application to check if the database is in the folder with your documents, and if it is not specified, you will copy it from your package ( [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:kFilename] ) into the document folder.
This may go beyond your original question, but since you are considering the possible deployment of your application and, more importantly, subsequent updates / releases of your application, you might want to add some table to your database with some internal database version number, which you can use to determine which version of the database the user has in the folder of his documents, and make any changes to this database that may be required to support the latter versions of your application. Just a thought.
In any case, if you still have open-ended questions, let us know. Otherwise, I assume that we have resolved your question.
source share