Expand description
Unified high-level API for iOS device interaction.
This crate ties together device discovery, pairing, tunneling, and service access into a single ergonomic API. It is the recommended entry point for library consumers.
Key types:
- [
device::IosDevice] — connected device handle with service access discovery— USB and network device discovery
Internal transport modules are not part of the public API. Use top-level re-exports for supported types:
use ios_core::{pair_new_device, PairedCredentials, PairingTransportError};
use ios_core::{default_pair_record_path, LockdownClient, LockdownError, PairRecord};
use ios_core::{archive_string, NsUrl, XcTestConfiguration, XctCapabilities};
use ios_core::{TunMode, TunnelError, TunnelHandle, TunnelInfo, TunnelManager};ⓘ
use ios_core::proto::nskeyedarchiver_encode::archive_string;ⓘ
use ios_core::lockdown::PairRecord;ⓘ
use ios_core::pairing_transport::UNTRUSTED_SERVICE_NAME;ⓘ
use ios_core::tunnel::TunMode;ⓘ
use ios_core::xpc::RsdHandshake;Re-exports§
pub use credentials::PersistedCredentials;pub use credentials::RemotePairingRecord;pub use device::discover_paired_mobdev2_devices;pub use device::connect_direct_usb_tunnel;pub use device::connect_remote_pairing_tunnel;pub use device::connect_tcp_lockdown_tunnel;pub use device::ConnectOptions;pub use device::ConnectedDevice;pub use device::InternationalConfiguration;pub use device::PairedMobdev2Device;pub use device::ServiceStream;pub use discovery::browse_mobdev2;pub use discovery::browse_remotepairing;pub use discovery::BonjourService;pub use discovery::MdnsDevice;pub use discovery::DeviceEvent;pub use discovery::DeviceInfo;pub use error::CoreError;pub use services::accessibility_audit;pub use services::afc;pub use services::amfi;pub use services::apps;pub use services::arbitration;pub use services::companion;pub use services::crashreport;pub use services::debugserver;pub use services::deviceinfo;pub use services::diagnostics;pub use services::dproxy;pub use services::dtx;pub use services::fetchsymbols;pub use services::file_relay;pub use services::fileservice;pub use services::heartbeat;pub use services::idam;pub use services::imagemounter;pub use services::instruments;pub use services::mcinstall;pub use services::misagent;pub use services::mobileactivation;pub use services::notificationproxy;pub use services::ostrace;pub use services::pcap;pub use services::power_assertion;pub use services::preboard;pub use services::prepare;pub use services::restore;pub use services::screenshot;pub use services::springboard;pub use services::syslog;pub use services::testmanager;pub use services::webinspector;pub use services::backup2;pub use services::device_link;pub use services::simlocation;
Modules§
- credentials
- Pairing credential persistence.
- device
- discovery
- error
- services
- Feature-gated iOS device service implementations.
- xpc_
message_ flags - XPC message flags.
Structs§
- Full
Pair Record - Full pair record data sent inside the lockdown Pair request.
- GetValue
Request - GetValue
Response - Lockdown
Client - High-level Lockdown client. Handles session management and service starting.
- MuxClient
- usbmuxd client for device discovery and connection.
- NsUrl
- Pair
Record - iOS device pair record, loaded from the platform-specific lockdown directory.
- Paired
Credentials - Stored credentials after successful pairing.
- Query
Type Request - Query
Type Response - Remove
Value Request - RsdHandshake
- Result of the RSD handshake.
- Service
Descriptor - A discovered iOS 17+ service.
- Service
Info - Service info returned by StartService.
- SetValue
Request - Start
Service Request - Start
Service Response - Start
Session Request - Start
Session Response - Stop
Session Request - Tunnel
Handle - A live tunnel handle. Dropping this handle signals the tunnel task to stop.
- Tunnel
Info - Information returned by the CDTunnel handshake.
- Tunnel
Manager - Manager for active tunnel instances.
- Value
Operation Response - XcTest
Configuration - XctCapabilities
- XpcClient
- High-level XPC client for iOS 17+ services.
- XpcMessage
- An XPC message.
Enums§
- Lockdown
Error - Errors from lockdown operations.
- Pair
Record Error - Pairing
Transport Error - Error type for pairing transport.
- TunMode
- TUN mode selection.
- Tunnel
Error - Errors from tunnel operations.
- XpcError
- Errors from XPC operations.
- XpcValue
- XPC value variants (matches go-ios encoding.go type constants).
Constants§
Functions§
- archive_
array - Encode an array of pre-archived values as NSArray.
- archive_
bool - Encode a bool as NSKeyedArchiver binary plist (NSNumber/BOOL).
- archive_
data - Encode a byte array as NSKeyedArchiver binary plist (NSData).
- archive_
dict - Encode a dictionary as NSDictionary.
- archive_
float - Encode a float as NSKeyedArchiver binary plist (NSNumber/double).
- archive_
int - Encode an integer as NSKeyedArchiver binary plist (NSNumber/int64).
- archive_
nsurl - Encode an NSURL object with a file:// relative path.
- archive_
null - Encode an NSNull object.
- archive_
string - Encode a string as NSKeyedArchiver binary plist (NSString).
- archive_
uuid - Encode an NSUUID object.
- archive_
xct_ capabilities - Encode an XCTCapabilities object with a capabilities-dictionary payload.
- archive_
xctest_ configuration - Encode a minimal XCTestConfiguration object suitable for testmanager startup.
- connect
- Connect to an iOS device by UDID and optionally establish a CDTunnel.
- decode_
xpc_ message - Decode an XPC message from a byte buffer.
- default_
pair_ record_ path - discover_
mdns - Discover iOS 17+ devices on the local network via mDNS.
- encode_
xpc_ message - Encode an XPC message to bytes.
- handshake_
only_ service_ tls - Perform a TLS handshake and immediately return the underlying plaintext stream.
- list_
devices - List all currently connected iOS devices (via usbmuxd).
- pair_
new_ device - Perform the full SRP pairing handshake with a new (untrusted) device.
- pair_
supervised - Perform supervised pairing with a P12 certificate on a raw lockdown stream.
- recv_
lockdown - save_
pair_ record - Save a
FullPairRecordto disk as a plist file compatible withPairRecord::load(). - send_
lockdown - start_
lockdown_ session - Perform lockdown QueryType + StartSession, then upgrade the stream to TLS via native-tls.
- start_
service - Send StartService over an established TLS session.
- strip_
service_ tls - Drop the post-lockdown service TLS layer and recover the underlying stream.
- watch_
devices - Watch for usbmux attach/detach events through the reusable ios-core discovery layer.
- wrap_
service_ tls - Wrap a service stream with TLS (for services with EnableServiceSSL=true).