idevice
Logs & Capture

OS Trace Relay

Read unified logging and archive trace output.

OS Trace Relay exposes com.apple.os_trace_relay through OsTraceRelayClient. It can start a trace, read PID lists, stream log entries, and write trace archives.

Use It For

  • Stream OS trace logs.
  • Read process identifiers known to the trace service.
  • Create a trace archive.

Feature Flag

Cargo.toml
[dependencies]
idevice = { version = "0.1.64", features = ["usbmuxd", "syslog_relay"] }

Service Names

PathValue
Lockdowncom.apple.os_trace_relay
RSDcom.apple.os_trace_relay.shim.remote

Rust Example

src/main.rs
use idevice::{
    IdeviceService,
    os_trace_relay::OsTraceRelayClient,
};

let provider = first_provider().await?;
let mut client = OsTraceRelayClient::connect(&provider).await?;
let mut receiver = client.start_trace().await?;
while let Some(log) = receiver.next().await? {
    println!("{log:?}");
}

CLI Equivalent

Terminal
idevice-tools os_trace_relay

Common Errors

ErrorWhat to check
Service not foundThe device/iOS version does not advertise this service on the selected transport.
Connection failedCheck pairing, trust state, and whether the selected provider can reach the device.
Permission errorThe service requires a device state, entitlement, or developer setting that is not active.

Source

On this page