I'm developing an iPhone app that uses the built-in SQLite database. I'm trying to view and open the database via the sqlite3
command line tool so I can execute arbitrary SQL against it.
When I run my app in the simulator, the .sqlite
file it creates is located at ~/Library/Application Support/iPhone Simulator/User/Applications/
.
How can I see that file on the physical iPhone?
Step 1 − Open Xcode -→ Single View Application -→ Let's name is DBSqlite. Step 2 − Let's develop our UI, Open Main. storyboard and add one text field and two buttons as shown below. Step 3 − Create @IBAction for both the buttons and @IBOutlet for text field and name them btnInsert, btnShowData and name respectively.
The database that can be used by apps in iOS (and also used by iOS) is called SQLite, and it's a relational database. It is contained in a C-library that is embedded to the app that is about to use it.
-Navigate to /Users/jk/Library/Developer/CoreSimulator/Devices/ and select the simulator file that matches the ID you found. -In the finder search, search for The current Model Version name.
Instructions for Xcode 6.0.1
In Xcode select window->organizer and expand the node next to your application in the applications section on your phone. Select the black downward pointing arrow next to application data and save the file anywhere on your desktop. Your sqlite database should be in there somewhere.
As for how to go about getting it back on the phone once your done i have no clue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With