I am attempting to run the iOS simulator from the command line. I have found the location where the iPhone Simulator can be run from. My question is whether or not it can receive parameters to specify which device should be launched and what app it should run.
$ ./Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone\ Simulator
Does anyone know if there are tricks to this. Knowing more about this would really help with our Continuous Integration process.
We now use WaxSim to automate our iOS applications during CI Builds
Download an iPad browser, such as Dolphin Browser or Opera Mini. Then download a web browser that is iPhone/iPod touch only, such as Mango Browser, iFox FREE, Sphere, or Full Screen Web Browser (99¢). Then you can run an iPad browser in the full iPad mode and run another browser that is in the 1x 2x iPhone mode.
Well, that's not entirely true, you can actually still directly launch iOS Simulator without opening Xcode first by creating an alias. Note that modern versions of Xcode and OS X call the iOS Simulator simply “Simulator”, where you go will depend on which version of OS X the Mac is running.
To run your app in Simulator, choose an iOS simulator—for example, iPhone 6 Plus, iPad Air, or iPhone 6 + Apple Watch - 38mm—from the Xcode scheme pop-up menu and click Run. Xcode builds your project and then launches the most recent version of your app running in Simulator on your Mac screen, as shown in Figure 1-1.
Continuous integration, or CI as it will be referred to from here on, is an ecosystem of software, usually more than one package, that allows you to test and deploy your iOS apps with minimal manual involvement, sometimes even none.
Use the -SimulateApplication
argument to run your executable in the simulator (executable inside the .app
bundle)
(you could also compile the project from the command-line like this:) xcodebuild -project Test.xcodeproj -arch i386 -sdk iphonesimulator
Then for example:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication Test.app/Test
or
./Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication Test.app/Test
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With