Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open sqlite database file inside iphone simulator?

I'm having a hard time trying to understand a problem in my iphone app.

I have a set method in my sqlite database that looks like it is working fine. I do a NSLog when I am setting the value and it is correct. It's a string with the value "2010-10-10 12:13:14".

When I use the get method on the same data, it turns out that the value is not correct. It returns 1.

Is there any way to open the database file that is inside the iPhone simulator so I can see what is the actual data stored in the simulator database?

Is there any way to sniff the sqlite calls between my simulator and the actual file? Something like Charles, or Service Capture?

Many thanks!

like image 919
Mauro Avatar asked Jan 10 '11 12:01

Mauro


People also ask

How do I open a DB file in iOS?

Xcode 10.1In the Devices tab, select your application, then click on the Gear icon, then click Download Container... Choose the location you want to save the file, then click on Save. I recommend downloading DB Browser for SQL File, and opening the . sql file with that.


1 Answers

Since IOS 8 they put it in a different folder:

Library/Developer/CoreSimulator/Devices/(numbers and letters)/data/Containers/Data/Application/(numbers and letters)/Documents/

Check this answer for more info

like image 106
bicycle Avatar answered Sep 20 '22 17:09

bicycle