idevice
Connection

RSD

Discover and connect to Remote Service Discovery services.

RSD discovers services advertised through the RemoteXPC handshake. RsdHandshake parses the service table and connects typed RsdService clients by advertised port.

Use It For

  • Listing RemoteXPC/RSD services.
  • Connecting to clients that implement RsdService.
  • Reading advertised service metadata such as port, entitlement, and UsesRemoteXPC.

Feature Flag

Cargo.toml
[dependencies]
idevice = { version = "0.1.64", features = ["rsd", "xpc"] }

rsd enables xpc in the crate feature graph.

Transport Path

RSD socket -> RemoteXPC handshake -> Services dictionary -> service port

Over USB for iOS 17+ service access, the bundled tools create the RSD socket through CoreDeviceProxy and a software tunnel.

Rust Example

src/main.rs
use idevice::rsd::RsdHandshake;

let mut handshake = RsdHandshake::new(rsd_stream).await?;

for (name, service) in &handshake.services {
    println!("{name}: port={} xpc={}", service.port, service.uses_remote_xpc);
}

Connect a typed RSD service:

src/main.rs
let client = handshake
    .connect::<YourRsdService>(&mut rsd_provider)
    .await?;

CLI Equivalent

List RemoteXPC services through the bundled USB tunnel path:

Terminal
idevice-tools remotexpc

Remote pairing and tunnel inspection:

Terminal
idevice-tools rppairing tunnel

Common Errors

ErrorWhat to check
Missing Services dictionaryThe stream did not complete the expected RSD handshake.
ServiceNotFoundThe requested RsdService::rsd_service_name() is not advertised.
RSD connect failedThe tunnel/provider could not connect to the advertised port.

Source

On this page