129

Where on my machine is the iPhone simulator installed?

I'm been trying to find where a test application I run in the simulator is stored.

pkamb
  • 33,281
  • 23
  • 160
  • 191
teepusink
  • 27,444
  • 37
  • 107
  • 147

18 Answers18

144

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

You can browse simulator files from that directory in Mac OS X.

Besi
  • 22,579
  • 24
  • 131
  • 223
Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
  • 9
    That's not the location of the _simulator_, but the data files, which seems to be the OP's intent. – Sophie Alpert Oct 14 '09 at 17:40
  • 1
    Yes. The directory I posted is what he/she is looking for. He/She'll find the test application he/she ran somewhere in that folder. – Pablo Santa Cruz Oct 14 '09 at 17:42
  • 6
    You can use `~` in the path instead of `/Users/INSERT_YOUR_USER_HERE`, so it becomes: `~/Library/Application Support/iPhone Simulator/` – progrmr Nov 30 '11 at 15:05
  • 2
    I took the liberty of adjusting the path with `~` like progrmr suggested. – Besi Mar 16 '12 at 03:43
  • 32
    Answer is outdated, for me (xcode 4.3.3) it was in Xcode's package contents (then in `Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app`) as http://stackoverflow.com/questions/1567798/iphone-simulator-location#answer-10940614 mentioned – abernier Jul 31 '12 at 10:28
  • 3
    for copy paste into terminal: cd ~/Library/Application\ Support/iPhone\ Simulator/ – Tony Gibbs Feb 27 '14 at 04:41
  • 1
    Here's where the Simulator.app is in Xcode 5.1.1: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app – Liron Yahdav Aug 06 '14 at 20:15
  • 1
    for xcode 5.1 was where mine is /Users/[USERNAME]/Library/Application Support/iPhone Simulator/7.1/Applications/ – Deprecated Darren Aug 13 '14 at 17:41
  • 1
    this answer is outdated and should be removed or unchecked – Tankista Oct 06 '17 at 08:54
75

Update for Xcode 4.4: While the iPhone simulator is still in the same place, Apple has included a shortcut to the iPhone Simulator at:

/Applications/Xcode.app/Contents/Applications

Changes since Xcode 4.3.1

Please note that the new version of Xcode is now available on the Mac App Store. Hence all the stuff that used to come with an installer is now packaged into Xcode.app.

Therefore the iOS Simulator binary is located here:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/

The Apps installed in the simulator along with other configuration files are still here:

~/Library/Application Support/iPhone Simulator/

Here is an extract from the current release notes of Xcode 4.3.1

What's new in Xcode 4.3.1

Xcode is now distributed as an application, rather than as an installer. This change enables Xcode to be updated directly from the Mac App Store.

Besi
  • 22,579
  • 24
  • 131
  • 223
56

As of Xcode 6 and iOS 8 you’ll find it here:

~/Library/Developer/CoreSimulator/Devices/{cryptic number}/data/Containers/Data/Application/{cryptic number}/

or you can get it from below code execution:

 NSLog(@"Documents Directory: %@", [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]);
patridge
  • 26,385
  • 18
  • 89
  • 135
Hardik Darji
  • 3,633
  • 1
  • 30
  • 30
29

Xcode 6 -> /Users/{YOUR NAME}/Library/Developer/CoreSimulator/Devices/{DEVICE ID}/data/Containers/Data/Application/{APPLICATION ID}/

Or print it out in Xcode console

#if TARGET_IPHONE_SIMULATOR
    NSLog(@"Documents Directory: %@", [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]);
#endif
mikemike396
  • 2,435
  • 1
  • 26
  • 41
24

The actual Simulator application itself is located at /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator

Pete Hodgson
  • 15,644
  • 5
  • 38
  • 46
13

To find the most recent install of your application in the simulator, you can use this command:

find "/Users/$USER/Library/Application Support/iPhone Simulator" -type d -name 'YourAppName.app' -print0 | xargs -0 ls -td | head -1

Don't forget to replace YourAppName with the name of your app!

johnboiles
  • 3,494
  • 1
  • 32
  • 26
12

In Xcode 6, iOS Simulator.app is located in this location:

/Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app
pkamb
  • 33,281
  • 23
  • 160
  • 191
Balaji Sekar
  • 3,295
  • 3
  • 16
  • 13
8

With the introduction of CoreSimulator in Xcode 6, each simulated device now has its own data. Previous versions had all devices share the same data for each version of iOS.

Devices are located in ~/Library/Developer/CoreSimulator/Devices. Logs are located in ~/Library/Logs/CoreSimulator

Note that ~/Library/Developer/CoreSimulator/Devices//data/Library/Logs is a symlink to ~/Library/Logs/CoreSimulator/.

CoreSimualtor will create an initial set of devices on first use (and after installation of older simulator runtimes). You can add or delete new devices from within Xcode.app or from the command line using 'xcrun simctl create' or 'xcrun simctl delete'

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
7

As of 4.3.2 of Xcode for Lion, the iOS simulator is located in the contents of the app package... If you right click on xcode.app and click "Show package contents" then navigate to Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications there you will find the iOS Simulator app... Just drag it to your dock and there you go... Or you can make an Alias and drag that to your desktop (or wherever you want) for easy access to the simulator... Why Apple decided to bury it in the package, I have no clue.

Richard Bakos
  • 73
  • 1
  • 3
6

On El Capitan and Xcode 7.2 and 7.3 I found the Simulators here: /Applications/Xcode.app/Contents/Developer/Applications/

  • Simulator
  • Simulator (Watch)
Johan Dettmar
  • 27,968
  • 5
  • 31
  • 28
6

From xCode 8.0 the simulator .app is located in

/Applications/Xcode.app/Contents/Developer/Applications

enter image description here

Steven B.
  • 1,429
  • 2
  • 19
  • 38
6

In X-Code 4.2
The Photos of the iPhone simulator are stored in

/Users/user_name/Library/Application Support/iPhone Simulator/5.0/Media/DCIM/100APPLE
Aravindhan
  • 15,608
  • 10
  • 56
  • 71
5

For xcode 7, you'll find it at here

/Users/{USERNAME}/Library/Developer/CoreSimulator/Devices/{CRIPTIC NUMBER}/data/Containers/Data/Application/{CRIPTIC NUMBER}/Documents/

or execute the code below in your xcode project

Objective C

NSLog(@"Documents Directory: %@", [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]);

Swift

print(applicationDocumentsDirectory.path)

DavidODW
  • 417
  • 4
  • 16
4

The top answer is correct for location of the simulator app. But there is a secondary location where the example apps (and your app builds) are stored for the simulator to access. This is:

~/Library/Developer/CoreSimulator/Devices

Each subdir is a device ID. You can find where your app is by looking in each of these dirs at data/Containers/Bundle/Application/{app_id}

Scott Antipa
  • 121
  • 1
  • 1
4

I found the easiest way to find it programmatically. Run the app and put NSLog() for [NSBundle MainBundle], it will show you the whole path of the app running in simulator.

Adeel
  • 859
  • 6
  • 9
2

A super simple and sexy way is to use Apple Script:

property findtype : quoted form of "kMDItemContentType = \"com.apple.application-bundle\""

set simulatorFolder to POSIX path of (path to application support folder from user domain) & "iPhone Simulator/"
set appFiles to paragraphs of (do shell script "mdfind -onlyin " & quoted form of simulatorFolder & " " & findtype)
if appFiles is not {} then
    set mostRecentApp to item 1 of appFiles
    tell application "Finder" to reveal ((POSIX file mostRecentApp) as alias)
    tell application "Finder" to activate
end if

Paste this into Apple Script Editor and export it as a Mac app. Then you can just run the app whenever you need a Finder window open in the sandbox. The code is courtesy StefanK at MacScripter.

augustzf
  • 2,385
  • 1
  • 16
  • 22
2

It took me a while, but I just found mine at /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app

Chuck Bergeron
  • 2,037
  • 2
  • 15
  • 18
1

All of these paths keep getting outdated with each Xcode release . The best way I found (so far) is this ⤵︎

  1. Open Xcode and launch Simulator.app
  2. Simulator.app will now appear in your dock
  3. Right click the app icon in the dock and select Options > Show in Finder
  4. The app's location will appear in a Finder window

enter image description here

tyirvine
  • 1,861
  • 1
  • 19
  • 29