How to Access XCode iPhone / iPad Simulator Directory

Your App can write files inside its document directory. This is most commonly used for storing pictures taken from camera or storing SQLite database file. All these files can be access at the following location on your MAC –

/Users/YOURUSER/Library/Application Support/iPhone Simulator/IOSVERSION/Applications/APPID/Documents/file.txt

But this is hidden by default. You wont be able to access these files unless you turn on the option to view hidden files in your MAC.

To view hidden files in MAC –

1. Open the Terminal (located in /Applications/Utilities/)
2. At the command prompt type

defaults write AppleShowAllFiles -bool true

3. Press return
4. Type ‘killall Finder’ press return
5. Close the terminal

Now you would be able to browser the above path to simulator directory.

To hide the hidden files again –

Follow the same instructions above but with replace the terminal command with the following –

defaults write AppleShowAllFiles -bool false

Namit Gupta

Technical Lead iOS @ONEChampionship | Ex-SDE2 @ Halodoc, Ex-iOS Lead @ Vokal. ❤️ Swift, designing pixel-perfect UI and writing clean code. Check my portfolio here.

Leave a Reply