Features
< Back to Blog Overview

iOS VNC Server

2020-05-28
Take control of a physical iOS device via VNC
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn
  • Share on HackerNews

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:

  • brew install libimobiledevice
  • brew install libpng
  • brew install libvncserver
  • brew install carthage

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:


  • To get the udid: idevice_id -l
  • Start a WebDriverAgent session: curl -X POST -H "Content-Type: application/json" \ -d "{\"desiredCapabilities\":{\"bundleId\":\"com.apple.preferences\"}}" \ [SOME_IP]:8100/session
  • Copy the sessionID from this response and pass it to our VNC server

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.

TestingBot Logo

Sign up for a Free Trial

Start testing your apps with TestingBot.

No credit card required.

Other Articles

TestingBot has improved its Analytics Offering

TestingBot has long been providing Analytics to its users, where metrics are both visualised and available in table format. Recently we've been wo...

Read more
Codeless Web Automation on iOS and Android

What is Codeless Automation? Codeless Automation allows for creating and running automated tests, without writing the tests.

Read more
Microsoft Edge Chromium - Automated Selenium Testing

The new Microsoft Edge is a browser based on Chromium and was released on January 15, 2020. It is available on both Windows and macOS.

Read more
Katalon Studio Plugin for TestingBot

TestingBot has created a Katalon Studio Plugin available in the Katalon Store. Install Plugin

Read more
Opera on Android: Manual Testing

Today we're excited to add Opera Mobile on our Android devices and Emulators.

Read more
TestingBot Plugin for Bamboo

TestingBot has created a plugin to be used with Atlassian's Bamboo CI: TestingBot Plugin for Bamboo. This plugin enables Bamboo users to integrate...

Read more