Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does the iPhone simulator save the sqllite database

I have seen this question asked a few times on SO - but the answer always seems to be roughly the same:

 /Users/myName/Library/Application Support/iPhone Simulator/4.2/ ...

See related questions:

iOS 4.2 simulator files?

Where does the iPhone Simulator store its data?

where database store in iphone simulator (for Mac OS)?

Yet - when I don't seem to have this path on my machine. I don't have 'Library' folder in my User folder

I can find a library folder in the root of the drive, with an Application Support folder in there - but there's no iPhone Simulator subfolder there. The only place I can find an iPhone Simulator folder is where the actual simulator executable is stored - but there doesn't seem to be any data files there either.

I have Mac OS X 10.7.4 and Xcode 4.2

Everything seems to be working fine - I can run the simulator and use the database - I just can't find where it's stored on the host machine.

Are there any other standard folders where this data might be saved?

like image 319
Pete McPhearson Avatar asked Aug 01 '12 14:08

Pete McPhearson


People also ask

Where does the iPhone simulator store its data?

type: ~/Library/Application Support/iPhone Simulator.

How do I get SQLite files on my iPhone?

In 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.

How do I see SQLite database in Xcode?

Xcode 9.1: Open Finder, press Shift + Command + G, paste the path and press Go. Use DB Browser for SQLite to view the . sqlite file.


1 Answers

Are you looking for the Library directory through Finder, or on the command line? By default from Lion onwards the Library is hidden. You can unhide it by typing

/usr/bin/chflags nohidden ~/Library

at the terminal, or just navigate there via command line eg:

open ~/Library/Application\ Support/iPhone\ Simulator/
like image 106
stonesam92 Avatar answered Nov 06 '22 22:11

stonesam92