Highlights
🐛 The native macOS tunnel now works from a process running as root
--native — the macOS default since v11.0.0 — could not be used from anything running as root: a CI runner, a LaunchDaemon, or any command under launchctl asuser 0. It always failed with:
ERROR remotepairingd reported no device
The message pointed in the wrong direction: nothing was wrong with the device or the pairing. remotepairingd is an XPCService declaring ServiceType = User, so launchd registers it per-uid, in a logged-in user's domain and never in the system/root domain. The mach lookup from root does not return an empty device list — it returns Connection invalid, because the service does not exist in that domain at all.
The connection is now retargeted with the libxpc SPI xpc_connection_set_target_uid rather than relocating the whole process into the user's domain with launchctl asuser <uid>. The process stays root and reaches into that domain for this one service, which is far easier to reason about than a permanent relocation. Nothing changes for the ordinary unprivileged path, which is still the recommended way to use --native:
# now also works as root, unchanged command
sudo launchctl asuser 0 pymobiledevice3 remote start-tunnelRetargeting is applied automatically when the effective uid is 0. The target uid is taken from PYMOBILEDEVICE3_NATIVE_TARGET_UID when set, and otherwise from the console user. Set it explicitly on a host with no console user — a headless CI runner — since there is no other way to guess which user holds the pairing:
PYMOBILEDEVICE3_NATIVE_TARGET_UID=501 pymobiledevice3 remote start-tunnelThe failure message now names that variable when running as root with no console user. The SPI is bound defensively: it appears in no SDK header and the surface drifts across releases — its sibling xpc_connection_set_target_gid is already gone from current macOS — so a future removal degrades to a warning rather than a crash. It is never invoked off the root path, where it would trap the process. Documented per-transport in the network-stacks guide.
What's Changed
Full Changelog: v11.1.0...v11.1.1