iDevice Redirection with Citrix Virtual Delivery Agent for macOS

For Apple application developers, now iPhones and iPads can be redirected to macOS VDA from Citrix Workspace app. This will enable developers to debug and troubleshoot apps on physical devices, providing a valuable addition to use Xcode provided simulators.

idevice

System Requirements

  • macOS: 14.6 or later
  • macOS VDA: CR2507 or later
  • Citrix Workspace™ app
  • Windows: version 2402 LTSR or later CR

Releases

  • Mac: 2505
  • iDevice (iPhone, iPad) Requirements
  • iOS - 17.6.1 and later
  • iPadOS - 17.7.3 and later

Supported iDevice functionalities

With iPhone/iPad redirection, we have verified the following typical functionalities:

  • Manage and sync with iOS/iPadOS device.
  • Retrieving iOS/iPadOS syslogs and viewing / filtering them in macOS VDA.
  • Live debugging of applications on the redirected iDevice.

Network Latency Recommendations

We support a wide range of network latency as long as remote desktop can be connected, but for optimal performance to run the iPhone/iPad redirection,

  • Network round-trip time should ideally be around 60ms for the live debugging function to work smoothly, high latency could potentially impact usability
  • HDX™ Adaptive transport(UDP) is the preferred transport protocol over TCP based on the performance test results too.

Detailed performance data under various network conditions can be found in the last section of this article.

Configuration

  • The Citrix Studio USB redirection DDC policy must be enabled.

    usb

  • Set the “Client USB device redirection rule (Version 2)” to allow iDevice to be redirected.

    edit-setting

In the DDC policy, there are two types of USB rules:

  • Client USB device redirection rules
  • Client USB device redirection rules (Version 2)

Please use Version 2, as it offers enhanced device control capabilities. After adding the new VID/PID entries, the configuration will be complete. Client USB device redirection rules V2 specifies rules for filtering, splitting, and auto-connecting USB devices to a remote session. When this setting is selected, the host overrides the Client USB device redirection rules setting with the device rules configured in this setting. For more information, see USB Device Redirection

Note:

iDevice redirection can also work with the original “Client USB device redirection rules.” In that case, you must edit the CWA local file to enable CWA to redirect iPhone and iPad devices from the USB virtual channel on the clients.

  1. Open the search bar by pressing the Windows key and S key, then type “gpedit”.

  2. Go to Local Computer Policy -> Computer Configuration -> Administrative Templates -> Citrix Components -> Citrix Workspace -> Remote client devices -> Generic USB Remoting.

  3. Change the USB Device Rules to “Enabled” and add the iPad/iPhone Vendor ID (vid) and Product ID (pid) to the USB rules, as shown in the example below.

      Allow: VID=05ac PID=12ab; Allow: VID=05ac PID=12a8
    

    device-rules

    VID: 05ac, PID: 12ab means iPad VID: 05ac, PID: 12a8 means iPhone

Redirect the iDevices in Citrix Workspace app

For example, select the “Apple Inc. iPhone” device by clicking on the “Device” button within the CWA Collection Bar.

devices

Examples of using iDevice Redirection Feature

  • Manage or sync iOS device

    sync-ios

  • Retrieving iOS syslogs and viewing / filtering them in macOS VDA

    syslog

  • Debugging is available for applications on the redirected iOS device

    debugging

Tips for optimization iOS / iPadOS shared caches symbols sync for iDevice living debugging.

When debugging an iDevice with Xcode for the first time, Xcode copies shared cache symbols for the device. This is a one-time job, but the symbol file size is typically large, around 4 GB. macOS VDA also supports copying the symbols file from the remote iDevice to Xcode running in macOS VDA. Because the symbols file is large, the file copying time can take around 30 minutes.

cache-symbols

One optimization is to manually copy the shared cache into the Xcode folder in advance to bypass the file syncing in Xcode. If you have connected the iDevice locally:

  1. Open the local Xcode folder: ~/Library/Developer/Xcode/iOS DeviceSupport.

    device-support

  2. Copy the shared caches symbols file into macOS VDA under the same Xcode folder via network file sharing.

iDevice Redirection Performance Considerations

The performance of iDevice redirection relies more on network round-trip time (latency) and depends on USB Redirection feature (USB Virtual Channel capability). Network bandwidth in this case, has limited impact.

The network RTT can be retrieved by executing the “ctxsession -v” command from the Citrix Virtual Delivery Agent for macOS.

network-rtt

The table below displays the estimated time delays for various device actions based on Round Trip Time (RTT).

UDP Connections

Device Action RTT ~5ms RTT ~30ms RTT ~60ms RTT ~90ms RTT ~120ms
Show device info in macOS Finder 15s 30s 55s 80s 100s
Collect device syslog 1.5s 3s 7s 11s 16s
Sync/Deploy 100m file 60s 100s 160s 220s 270s
XCode live debugging w/ breakpoint 31s 85s 150s

250s

480s

TCP Connection

Device Action RTT ~5ms RTT ~30ms RTT ~60ms RTT ~90ms RTT ~120ms
Show device info in macOS Finder 12s 30s 55s 85s 106s
Collect device syslog 1.5s 4s 7s 13s 17s
Sync/Deploy 100m file 60s 145s 240s 340s 450s
XCode live debugging w/ breakpoint 40s 85s 150s

250s

480s

iDevice Redirection with Citrix Virtual Delivery Agent for macOS