Skip to main content

ios_core/xpc/
mod.rs

1//! XPC binary protocol over HTTP/2 for iOS 17+ service connections.
2//!
3//! Architecture:
4//!   h2_raw   – minimal raw HTTP/2 framer (streams 1 + 3)
5//!   message  – XPC binary message encode/decode
6//!   rsd      – RSD handshake (service discovery)
7//!   client   – High-level XpcClient
8
9#[cfg(feature = "tunnel")]
10pub mod client;
11#[cfg(feature = "tunnel")]
12pub mod h2_raw;
13pub mod message;
14pub mod rsd;
15
16#[cfg(feature = "tunnel")]
17pub use client::XpcClient;
18#[cfg(any(
19    feature = "apps",
20    feature = "dproxy",
21    feature = "fetchsymbols",
22    feature = "restore"
23))]
24pub(crate) use message::{XpcMessage, XpcValue};
25
26/// Errors from XPC operations.
27#[derive(Debug, thiserror::Error)]
28pub enum XpcError {
29    #[error("IO error: {0}")]
30    Io(#[from] std::io::Error),
31    #[error("not connected")]
32    NotConnected,
33    #[error("service not found: {0}")]
34    ServiceNotFound(String),
35    #[error("TLS / protocol error: {0}")]
36    Tls(String),
37}