TestingBot Blog

TestingBot provides a cloud of browsers and devices, ready to run your Automated, Live and Visual tests.

< Back to Blog Overview

iOS VNC Server

2020-05-28

Today we're excited to open-source a feature that we've been using in production for the last 3 years: an iOS VNC Server.


This will allow you to connect with your favorite VNC Client to a physical iOS device (no jailbreak required).


The program streams the screen of the iOS device through VNC and listens for mouse and keyboard events.

Setting it up

To get started, please clone the git repository: ios-vnc.


Next, please install these dependencies:


You can now build the project:

cd iOSVNCServer && make build

Dependencies

To control the device, you will need to set up WebDriverAgent.
This project exposes a couple of endpoints to take control of the device.


Once you've set this up correctly (signing and ./Scripts/bootstrap.sh), you can run the WebDriverAgent project to expose the HTTP endpoint.


Getting Started

The WebDriverAgent project will output a response similar to ServerURLHere->http://[SOME_IP]:8100<-ServerURLHere.
These values are required and need to be passed to our iosvncserver, together with the udid of the device:



You can now run the VNC server:


./iosvncserver -u [udid] -H [SOME-IP] -P 8100 -S [session-id]

And that's it! You can now point your favorite VNC client to `localhost:5901` and you will be able to view and take control of the iOS device.


Future plans

In the future we hope to improve the performance of both the rendering and the controls. All Pull-Requests and suggestions are welcome.

< Back to Blog Overview

Sign up for a Free Trial

Start testing your apps with TestingBot.

No credit card required.