Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Desmistifying the iOS Simulator

Desmistifying the iOS Simulator

Lightning talk at NSSpain 2015

Bcc6f48a555f7d478cfd911bb5e424bf?s=128

Mark Villacampa

September 18, 2015
Tweet

More Decks by Mark Villacampa

Other Decks in Programming

Transcript

  1. Demystifying the Simulator

  2. @MarkVillacampa

  3. RubyMotion

  4. None
  5. None
  6. KNOW YOUR TOOLS

  7. $ xcrun simctl create delete pair unpair erase boot shutdown

    rename getenv openurl addphoto install uninstall get_app_container launch spawn list icloud_sync help
  8. create delete pair unpair erase boot shutdown rename getenv openurl

    addphoto install uninstall get_app_container launch spawn list icloud_sync help $ xcrun simctl
  9. Multiple simulators running in parallel

  10. https://github.com/facebook/FBSimulatorControl (Yes, another Facebook project shoutout)

  11. $XCODE = /Applications/Xcode.app/Contents/Developer/

  12. SimRuntimes - One builtin SimRuntime per platform: /Library/Developer/CoreSimulator/profiles/Runtimes $XCODE/Platforms/AppleTVSimulator.platform/Developer/Library/CoreSimulator/ Profiles/Runtimes/tvOS

    9.0.simruntime/ $XCODE/Platforms/WatchSimulator.platform/Developer/Library/CoreSimulator/ Profiles/Runtimes/watchOS 2.0.simruntime/ $XCODE/Platforms/iPhoneSimulator.platform/Developer/Library/CoreSimulator/ Profiles/Runtimes/iOS 9.1.simruntime/ - Additional SimRuntimes:
  13. - Install additional SimRuntimes: https://github.com/neonichu/xcode-install/pull/47 xcode-install By jpsim by @neonacho

  14. DeviceTypes - Defined by Xcode: $XCODE/Platforms/iPhoneSimulator.platform/Developer/ Library/CoreSimulator/Profiles/DeviceTypes/

  15. $ xcrun simctl list - Available DeviceTypes - Available SimRuntimes

    - Existing devices
  16. $ DEVICETYPE=com.apple.CoreSimulator.SimDeviceType.iPhone-6 $ SIMRUNTIME=com.apple.CoreSimulator.SimRuntime.iOS-8-4 $ xcrun simctl create hugephone $DEVICETYPE

    $SIMRUNTIME CA898799-099C-4DB8-A3D4-FE11A78D9BD1 CREATING A NEW DEVICE
  17. ~/Library/Developer/CoreSimulator

  18. - WatchOS $XCODE/Applications/Simulator (Watch).app - iOS and tvOS $XCODE/Applications/Simulator.app TWO

    SIMULATOR APPLICATIONS
  19. - CI Servers WHY THIS IS IMPORTANT - Avoid using

    Xcode - Know your tools