I am in the process of (finally) loading my App onto an iPhone device for testing. So far I have only tested the App in the simulator. The application is data-centric and uses an SQLite database. I have created an appropriate SQLite database with sample data which I used in the simulator. How can I copy this .sqlite3 file to the actual iPhone?
This was easy with the simulator as I could just copy the .sqlite3 file into the ~/Library/Application Support/iPhone Simulator/User/Applications/{UUID}/Documents folder, but I cannot figure out how to get this into the same location on the actual iPhone device. Recreating the database from scratch on the phone is not really an option, as I have already done all the hard-yards creating the database on the Mac.
Why not add it to your application bundle? Right-click on the
Resourcesfolder in your project window in Xcode, then selectAdd>Existing Files...to add your sqlite database.You would then load the file from the application bundle: