xcrun simctl shows available options & xcrun simctl list list available devices.

Remember that the simulator can only run Apps specifically built for it, not apps from HockeyApp, Testflight or even the App store.

To build an app for the simulator do a

xcrun xcodebuild \
  -scheme $XCODE_SCHEME \
  -project $XCODE_PROJECT \
  -configuration Debug \
  -destination 'platform=iOS Simulator,name=iPhone 6 Plus,OS=9.1' \
  -derivedDataPath \
  build

etc.

Q: Can we use fastlane?
A: Probably.

On build machine

In

cd /Users/ci/.jenkins/workspace/BAG_AND_CHECKOUT__TEST_001
xcodebuild -sdk iphonesimulator -arch i386 | xcpretty
cd ./build/Release-iphonesimulator/UICatalog.app
zip -r UICatalog.app.zip *
mv  UICatalog.app.zip ~/Public/

unzip -q UICatalog.app.zip # ~> ./UICatalog.app

xcrun simctl install booted ./UICatalog.app

then (much) later, on a different Mac

unzip UICatalog.app.zip -d ./UICatalog.app
xcrun simctl install booted ./UICatalog.app

unzip archive_name.zip

URL’s in S3 look like this - http://my-name.s3-eu-west-1.amazonaws.com/RikWatson.jpg

We’re here - https://s3-eu-west-1.amazonaws.com/my-name/UICatalog.app.zip

simctl

simclt allows you to control the simulators running

run xcrun simctl to get the list of available subcommands. Lots of new options to play around.

Now to do what I wanted. Here is the command to launch simulator

xcrun instruments -w “iPhone 5 (8.0 Simulator)”

-w is to provide device type and to get the list of available devices, just execute this

xcrun instruments -s

After launching the simulator you can control it using simctl

To install you app

xcrun simctl install booted

To launch the app

xcrun simctl launch booted

xcodebuild -showsdks


http://stackoverflow.com/questions/5010062/xcodebuild-simulator-or-device

xcodebuild -configuration ${BUILD_TYPE} -target ${TARGET_NAME} -arch ${CPU_ARCHITECTURE} -sdk ${SIMULATOR_OR_IOS_SDK}

xcodebuild -showsdks -> -sdk iphonesimulator9.3 (or -sdk iphonesimulator for the latest) - both with -arch i386