Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view the data in sqlite file running in iphone application? [closed]

Tags:

sqlite

iphone

How to view the data which is present in the sqlite file in an application running in iphone , like we use mysql work bench to view the contents of the database

like image 592
pradeep Avatar asked Jan 10 '11 06:01

pradeep


People also ask

How can I see SQLite database in iOS?

Open DBBrowser and open database and in finder press CMD+SHIFT+G and paste your link there and press ENTER. You will be redirected to that location. 4. Select your SQLite file and it will be opened in DBBrowser.

How SQLite manage data in iOS apps?

Step 1 − Create a simple View based application. Step 2 − Select your project file, then select targets and then add libsqlite3. dylib library in choose frameworks. Step 3 − Create a new file by selecting File→ New → File...

Where is SQLite database stored iOS?

But if your app is a Core Data non-document-based app, which is very common, then the single SQLite file goes into the Application Support subfolder of your app's Container (sandbox).


2 Answers

If you want to view your database when running on Simulator it is located at the following location

user/Library/Application Support/iPhone Simulator/version of SDK(4.2eg)/Applications/4AF938D6-E981-4971-A588-3424B64E7EE7(eg)/Documents/yourdatabase.sqlite 

If you want to view the database in your device then you can use a software like iExplorer.

Cheers

Edit : The location of sqlite file has changed.

It currently resides in :

/User/Library/Application Support/iPhone Simulator/version of SDK(eg-7.0)/Applications/4AF938D6-E981-4971-A588-3424B64E7EE7(eg)/Library/Application Support/app_name/yourdatabase.sqlite 

Edit : The location has changed again. It now resides in:

/User/Library/Developer/CoreSimulator/Devices/789A1317-6C55-4615-A72E-65C824D8C6B9(eg)/data/Containers/Data/Application/0470F5FC-0043-46B7-A21C-A436A56ED714(eg)/Documents/yourdatabase.extension 
like image 200
Aditya Avatar answered Sep 21 '22 21:09

Aditya


The Firefox extension SQLite Manager is good and free. Another good, free Mac option is SQLite Database Browser.

like image 24
Matthew Frederick Avatar answered Sep 18 '22 21:09

Matthew Frederick