sergeyzenchenko / FBSimulatorClient

FBSimulatorClient is a simple way to interface talk to FBSimulatorControl framework to control using Rest Web Services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FBSimulatorClient

FBSimulatorClient is a simple way to interface talk to FBSimulatorControl framework to control using Rest Web Services. FBSimulatorControl is a Mac OS X library for managing and manipulating iOS Simulators.

Setup ( ๑○ิ﹏○ิ)

The FBSimulatorClient depends a opensource lib called as GCD WebServer To install a the dependencies you need CocoaPods. If you don't know whats cocoapods please refer to its getting started with CocoaPods guide. The nearest thing that i can tell you is that CocoaPods is like Maven but for XCode.

Usage (•ิ_•ิ)?

Once your build the app, you can launch it in command line with the following command: ./FBSimulatorClient.app/Contents/MacOS/FBSimulatorClient --start-server --port 9898

Following are the endpoints which can be hit

  1. Launch the simulator
  • endpoint : /simulator/launch
  • method : POST
  • body : {"simulatorType":"iPhone5s", "appPath":"/path/to/app"}
  • curl : curl -H "Content-Type: application/json" -X POST -d '{"simulatorType":"iPhone 5s","appPath":"/Users/tapan/awesome-app/Debug-iphonesimulator/awesome.app"}' localhost:9898/simulator/launch
  1. Kill the simulator(s)
  • endpoint : /simulator/kill
  • method : POST
  • body : {"processIdentifer" :"Process identifier of the sim to kill"} or nothing to kill all simulators
  • curl : url -H "Content-Type: application/json" -X PUT -d '{"processIdentifier":"6410"' localhost:9898/control
  1. Quit the application
  • endpoint : /control
  • method : PUT
  • body : {"command" : "quit"}
  • curl : curl -H "Content-Type: application/json" -X PUT -d '{"command":"quit"}' localhost:9898/control

There are obviously more things to be done. But its a start. Look at the power of this thing -

Screenshot

Contact

Follow me on Twitter (@tapthaker)

Problems ? (✖╭╮✖)

  • Add a new issue on github.
  • Add a question on stackoverflow and mention me in a tweet with the link.

To improve

  • More control on the simulators.
  • Introduce FBSimulatorControl as podfile instead of prebuild framework
  • Integrate this with some automation frameworks like Calabash for parallel execution of features
  • Stability issues

About

FBSimulatorClient is a simple way to interface talk to FBSimulatorControl framework to control using Rest Web Services.


Languages

Language:Objective-C 96.9%Language:Swift 3.1%Language:Ruby 0.0%