VNC server
The Mobile Gateway for iOS comes with a built-in VNC server which allows you to remotely control iOS devices.
You can use standard VNC clients, such as noVNC, TightVNC or RealVNC to remotely control iPhone, iPad and iPod devices.
The Mobile Gateway for iOS contains an embedded VNC server which allows you to remotely control iOS devices using a keyboard and mouse.
Requirements
The Mobile Gateway for iOS allows you to only remotely control iOS devices if these conditions are met:
- Your device is connected to a Windows, Linux or macOS computer using an USB cable
- You have enabled the Developer Tools on your iOS Device
- You have an iOS Developer Account and your iOS device is registered with your iOS developer account.
Enabling the VNC server
You must specify the --vnc
option if you want to start xcuitrunner with the embedded VNC server.
xcuitrunner will listen for VNC connections at port 5900
. You can have xcuitrunner listen on another
port by specifying the --vncPort
option.
Connecting to the VNC server
To connect to the VNC server, have your VNC client using the following parameters:
Parameter | Value |
---|---|
Server | localhost or 127.0.0.1 |
Port | 5900 or the value specified in --vncPort |
Password | The UDID of your device |
Supported Clients
We've validated xcuitrunner with the following VNC clients:
- TightVNC Viewer, a desktop-based VNC client for Windows
- UltraVNC, a desktop-based VNC client for Windows and macOS
- noVNC, a HTML5 VNC client. Requires websockify.
- Guacamole, a clientless remote desktop gateway.
Hardware Keys
You can use the following special key codes to simulate clicking on hardware buttons:
Device Button | Key Code | Key Description |
---|---|---|
Home Button | 0xffeb | Super Left |
Power Button (Lock/Unlock) | 0x1008FF10 | XF86XK_Standby |
Volume Up | 0x1008FF13 | XF86XK_AudioRaiseVolume |
Volume Down | 0x1008FF11 | XF86XK_AudioLowerVolume |
Performance Considerations
The frame rate (the frequency at which the remote display of your iOS device is updated) depends on multiple factors, including the size of the display of your iOS device and the performance of the processor in your iOS device.
By default, xcuitrunner will assume a high-bandwidth, low-latency network scenario.
You can improve the bandwidth of the VNC server on low-bandwidth, high-latency networks as follows:
- Enable zlib encoding or Tight encoding by advertising this encoding to the VNC server.
- When using Tigth encoding, you can further influence the performance by advertising either a compression level pseudo-encoding or a JPEG quality level pseudo-encoding.
- In particular, the JPEG quality level pseudo-encoding allows you to make a trade-off between bandwidth versus image quality.