idevice
CoreDevice

Pasteboard

Read, write, resolve, and observe CoreDevice pasteboard data.

Pasteboard is a CoreDevice service reached through RSD and RemoteXPC. The client connects to com.apple.coredevice.pasteboardservice.

Use It For

  • Connect through the iOS 17+ CoreDevice tunnel.
  • Call the typed CoreDevice client methods.
  • Use the matching tool command when one is registered.

Feature Flag

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

Service Names

PathValue
RSDcom.apple.coredevice.pasteboardservice

Rust Example

src/main.rs
use idevice::{RsdService, core_device::PasteboardServiceClient};

let mut client: PasteboardServiceClient<_> = rsd_handshake
    .connect(&mut rsd_provider)
    .await?;
client.set_text("hello", "general").await?;
let snapshot = client.get("general").await?;
println!("{snapshot:#?}");

CLI Equivalent

Terminal
idevice-tools pasteboard paste
idevice-tools pasteboard copy "hello"

Common Errors

ErrorWhat to check
RSD service not foundThe connected device did not advertise the CoreDevice service name.
RemoteXPC errorCheck the CoreDevice action and payload shape used by the client.
Tunnel unavailableCreate the iOS 17+ tunnel before connecting to CoreDevice services over USB.

Source

On this page