Is there any way to browse the file system of a currently running or just killed iOS simulator? I\'d settle for being able to see a specific app\'s files if there\'s a way t
first, get simulator list with device ID from terminal
Then go put device id below path. you will be get specific simulator file system
~/Library/Developer/CoreSimulator/Devices/{{deviceID}}
Open the program "Activity Monitor", search for your App (just the apps name, not the simulator), click "Informations" and open "Open files and ports". Copy the second entry (something like /Users/me/Library/Application Support/iPhone Simulator/4.2/Applications/B97A9504-0FA5-4826-BB6D-A2335A676459/VSGradientView.app/YourApp
). This is the running app, while <...>/B97A9504-0FA5-4826-BB6D-A2335A676459/VSGradientView.app/
is the bundle, and <...>/B97A9504-0FA5-4826-BB6D-A2335A676459/*
the sand-boxed folder.
If you pass this as open "/Users/me/Library/Application Support/iPhone Simulator/4.2/Applications/B97A9504-0FA5-4826-BB6D-A2335A676459/"
to the terminal, the folder will open in Finder.
Sounds complicated but isn't.
print(NSHomeDirectory())
and copy the path.Shift+Cmd+G
Alternative for 1. is to catch a breakpoint and do po NSHomeDirectory()
in console.
There is a nifty app that also supports the XCode 6 simulator.
https://github.com/somegeekintn/SimDirs
It is awesome, use it!
If you want to automate getting the location or use that folder in scripting, you can get the precise location from a running simulator with the following command:
xcrun simctl get_app_container booted my.app.id data
based on zsero answer
macOS 10.13.1
Run the following line in the terminal
Template
open `xcrun simctl get_app_container booted BUNDLEID_OF_YOUR_APP data` -a Finder
Full Sample
open `xcrun simctl get_app_container booted com.Test data` -a
BUNDLEID_OF_YOUR_APP = "Bundle Identifier"
Features of the solution 1
Create a bash scrip with a name of your app and code:
script_file_name = `basename "$0"`
open `xcrun simctl get_app_container booted $script_file_name data`
Features of the solution 2