iPhone Simulator location

前端 未结 17 1992
时光取名叫无心
时光取名叫无心 2020-12-12 10:32

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.

相关标签:
17条回答
  • 2020-12-12 10:47

    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!

    0 讨论(0)
  • 2020-12-12 10:48

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

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

    0 讨论(0)
  • 2020-12-12 10:49

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

    • Simulator
    • Simulator (Watch)
    0 讨论(0)
  • 2020-12-12 10:51

    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]);
    
    0 讨论(0)
  • 2020-12-12 10:53

    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.

    0 讨论(0)
  • 2020-12-12 10:53

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

    0 讨论(0)
提交回复
热议问题