Yos Ra
Yos Ra

Reputation: 117

Launch an application on the iOS simulator with using command line

Good Morning,

I am trying to launch an application on the iOS Simulator with command line so i put this command in the terminal:

open `xcode-select --print-path`/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app

With this command, the simulator is launched. My question is how can I start an application from the terminal?

Upvotes: 3

Views: 3854

Answers (2)

neeks
neeks

Reputation: 312

I do not have enough reps to write it as comment.

ios-sim is used by Facebook and lot of other companies for running automated tests and launching stuff via commandline into iOS simulator.

You can download it from the git repo, just open it in XCode and build it. The executable will be generated in the Build>products folder. (For XCode 6 ~/Library/Developer/Xcode/DerivedData/ios-sim-xxxxxx.../Build/Products/) https://github.com/phonegap/ios-sim

Here is a command to run the .app in iOS6 simulator:

ios-sim launch ./MyApp.app --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-6"

Upvotes: 2

Matthew Burke
Matthew Burke

Reputation: 2364

I have used WaxSim (referenced in rog's comment) and it works pretty well. You can find it at https://github.com/square/WaxSim. For what it's worth, there have been no commits for something like two years and there are a number of open pull requests.

Recently I have started using ios-sim which can be found at https://github.com/phonegap/ios-sim. It looks like (currently) it is active and seems to have more functionality. So far, I haven't had any problems with it (although I have not used it in anger yet).

Upvotes: 2

Related Questions