When developing an app that downloads data and/or creates a lot of data, it is useful to inspect the simulator’s file system to ensure the files are what, and where you expect them to be. I was tired of having to manually dig in and figure out where these files were being installed to, so I wrote an Xcode Run Script to figure it out for me.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Install it as a run script in your Xcode Target like so:
It works by using the
find command to search the iOS Simulator’s file system for the product name, then grabs the most recently modified one.
If this run script is added after the copy files script, we can be assured that the most recently modified one is the one we just built.
Once we have the most recent product, we find it’s root directory (i.e. app folder) then open up it’s Application Support directory.
You may need to edit the
MOST_RECENT_APP_DATA_DIRECTORY= line to suit the directory structure for your specific project. Enjoy
Lastly, I run a small software company called Urban Apps. It pays the bills so I can take the time to write helpful posts like this one. If you found this posting helpful at all, I would really appreciate it if you would check out my Apps on the iTunes App Store.