Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding a saved file on the Simulator?

Tags:

I'm using the MusicSequenceFileCreate function to save out a midi file to make sure the data is correct. I'm not getting any errors but I would like to view the saved file but have no idea how to do this.

I know I can try reading it in in iOS but I would like to view it (and test it) on the desktop.

Is this file stored in some Simulator cache that I can access?

like image 490
spring Avatar asked Mar 15 '12 00:03

spring


People also ask

Where are simulator files saved?

You also may just go to the ~/Library/Developer/CoreSimulator/Devices/ folder in Finder ( Shift+Cmd+G ), and then click on the Date modified tab on the top of the folder menu. You'll get the most recently used simulator folder without UDID.

How do I access iOS simulator files?

~/Library/Developer/CoreSimulator/Devices Once in a folder, go to Applications, choose the Finder option that shows date for files, and sort by date.

Where are iOS simulators stored?

type: ~/Library/Application Support/iPhone Simulator.

How do I view simulator logs?

To access it, open the Chrome Developer tools from the More tools menu. Inside it you need to open the Remote devices view from the More tools menu. The view will list all attached Android devices and running emulator instances, each with its own list of active web views.


2 Answers

The location changed for Xcode 6 with iOS 8:

~/Library/Developer/CoreSimulator/Devices/DEVICE_UDID/data/Containers/Data/Application/APPLICATION_ID/Documents 

DEVICE_UDID: can be found out in the Device Inspector (Window -> Devices) and Select the simulated device you're running on. The field Identifier contains the device's UDID.
You can also get a list of the simulator UDID's by running the command xcrun simctl list (thanks @JeremyHuddlestonSequoia)

APPLICATION_ID: I didn't find this number somewhere, so I looked into the folders until I found what I wanted. If someone finds out where this number comes from, let me know.
EDIT: The ID of the application changes every time you start the simulator, but when you keep a finder window open pointing to that folder, you'll always find yourself in the correct folder (no idea how they do that; every other application seems to loose track of the files), which is extremely handy!

like image 182
v01pe Avatar answered Sep 20 '22 13:09

v01pe


Yes the you can access the Simulator files from ~/Library/Application Support/iPhone Simulator/.

In this folder are the various iOS version numbers so pick the one you are running. In that will be Applications and you'll see a bunch of GUIDs, one of which will be the running app.

One thing in OSX 10.7 is that the Library folder is now hidden. This article explains how to restore the visibility; Show User Library Directory in Mac OS X 10.7 Lion

like image 34
Dave Anderson Avatar answered Sep 20 '22 13:09

Dave Anderson