Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run iPhone/iPad Simulator for Continuous Integration

Tags:

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

like image 422
rynmrtn Avatar asked Dec 02 '11 03:12

rynmrtn


People also ask

How do you simulate an iPhone on an iPad?

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.

Can you run iOS simulator without Xcode?

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.

How can I run Xcode simulator on my iPhone?

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.

What is continuous integration iOS?

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.


1 Answers

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

like image 129
Erwin Coumans Avatar answered Sep 19 '22 19:09

Erwin Coumans