Update 8.1.3: Someone at Cupertino just can’t make up their mind. With the release of 8.1.3 the path for the documents directory changed yet again from:
~/Library/Developer/CoreSimulator/Devices/<SIMULATOR YOU WANT>/data/Containers/Data/Application/<APP YOU WANT>
to,
~/Library/Developer/CoreSimulator/Devices/<SIMULATOR YOU WANT>/data/Applications/<APP YOU WANT>
tl;dr: Download the app. Run it to open the most recent application’s documents directory.
Upto iOS 7.1, the iOS simulators were located under
~/Library/Application Support/iPhone Simulators/
where you would be presented with a list of all the simulators you used. You can read more about it here. iOS 8 changed the directory hierarchy of the Simulator Devices and its Documents directories. Simulators are now located at
~/Library/Developer/CoreSimulator/
But there is another surprise. Instead of being presented with a human readable list of simulators like this,
we now get gibberish
Apparently, Apple thinks simulator names are too confidential to reveal to app developers. (before you get your chaddi in a ganth, I am just kidding. I am sure there is some perfectly reasonable explanation for this) Basically, we now have folders with UUIDs for names that we can’t map to anything. Assuming you are only interested to get into the device simulator you were most recently working with, a workable solution is to sort them by modified date in list view.
In my case I can safely assume that 7B2CF1B3-1820-4313-B010-A4CCD4764D10 is actually simulator folder for iPhone 6 plus – 8.1 that I was just testing.
Next – Locating the Applications
Locating the application is another run through the maze. Inside your simulator folder you will find a structure like this
The applications are located under
/data/Containers/Data/Application/
Here you can again sort the list by ‘Date Modified’ to get you most recent app on the top. The rest of the structure remains unchanged. So now you can just create an alias (shortcut) on you desktop and… STOP. YOU CAN’T! Because on each run of your app, the directory name for your app changes.. wow! You will have to do a circus everytime you need to inspect the documents directory of your current app. Unless you want to be awesome that is. And you can do that by writing a script, which
- Navigates to the CoreSimulators/Devices directory
- Sorts the results by ‘Data modified’
- Picks up the latest one.
- Navigates to ../data/Containers/Data/Application/
- Sorts the results again
- Picks up the latest one.
- opens that directory in Finder.
You can find my script here if you want a guide, other wise just go for the directly executable app –
Download Executable App
Like other script apps the best way to use this app is to put it in some folder and just forget. You can launch it directly from spotlight every time you want to open the Documents directory.