Accessing files stored by the iOS Simulator

iOS provides limited access to the directory structure for your device. You may often wonder what it looks like. If you are creating a temporary plist or generating a text file, you may want to see where exactly it gets stored on your device. For those with non-jailbroken devices, this can be a difficult task. Yes, you can always work with relative paths inside Xcode and there’s no problem, but certain frameworks generate files which are stored locally on the device. For eg.,  the OpenEars library running the CMU speech recognition engine generates a dictionary and language model (.arpa and .DMP) and stores it ‘somewhere’ on the device. To access the directory structure for your iOS simulator, type in the following command in Terminal:

 

open -R `find ~/Library/Developer/CoreSimulator/Devices \
 -type d -depth 5 -name "*.app" -print0 | xargs -0 stat -f \
 "%m %N" | sort -rn | head -1 | cut -f2- -d" "`

That will open the folder where your simulator has stored your filed. Now you just have to search for your filename and voila. Note that the above command opens up 5 levels deep in your folder structure. So you may have to move up a few level and then search for the file you are looking for.

 

Screenshot 2016-02-19 16.09.16

No comments yet.

Leave a Reply

Max level reaching...

%d bloggers like this: