idevice
Device Info & System

Heartbeat

Exchange Marco/Polo heartbeat messages with the device.

Heartbeat exposes the com.apple.mobile.heartbeat service through HeartbeatClient. The client reads Marco messages and replies with Polo messages.

Use It For

  • Check that a service connection stays alive.
  • Exercise the heartbeat service from tools.
  • Handle heartbeat traffic in tests or diagnostics.

Feature Flag

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

Service Names

PathValue
Lockdowncom.apple.mobile.heartbeat
RSDcom.apple.mobile.heartbeat.shim.remote

Rust Example

src/main.rs
use idevice::{
    IdeviceService,
    heartbeat::HeartbeatClient,
};

let provider = first_provider().await?;
let mut client = HeartbeatClient::connect(&provider).await?;
let marco = client.get_marco().await?;
println!("{marco:#?}");
client.send_polo().await?;

CLI Equivalent

Terminal
idevice-tools heartbeat_client

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