Make a paired iPhone appear local to a remote Mac by proxying Apple's Bonjour and CoreDevice traffic through a private Tailscale network.
The bridge does not build apps itself. It lets the Mac's normal Apple tooling
(xcodebuild, devicectl, and related services) reach the iPhone without a
USB cable or a shared physical Wi-Fi network.
iPhone CoreDevice services
│
│ Tailscale address
▼
Mac socat TCP/UDP relays
│
│ local Bonjour advertisement on en0
▼
Apple CoreDevice on the Mac sees a paired iPhone
This project requires device-specific pairing material. Never publish or share
your bridge.local.conf, especially authTag. Do not expose the forwarded
ports to the public internet. Use Tailscale ACLs and only pair devices you
trust.
The repository contains only templates and code. Every user must capture the values for their own paired iPhone.
- A Mac with Xcode and its command-line tools installed.
- A paired iPhone with Developer Mode enabled.
- Tailscale installed and connected on both devices, in the same tailnet.
- Homebrew's
socat:brew install socat. - The iPhone associated with Wi-Fi. Tailscale can provide the cross-network path, but pure-cellular CoreDevice installation is not assumed to work.
Pair the iPhone to the Mac using USB first. Trust the Mac, enable Developer Mode if prompted, allow device preparation to finish, and enable the wireless connection in Xcode when offered.
With the iPhone on Wi-Fi and Tailscale connected, capture its Bonjour record:
dns-sd -B _remotepairing._tcp local.
dns-sd -L "<the-instance-name>" _remotepairing._tcp local.
tailscale ip -4Record the instance name, hostname, port, and TXT values:
identifier, authTag, ver, minVer, and flags. Keep the pairing data
private.
cp bridge.local.conf.example bridge.local.confEdit bridge.local.conf with the values captured from your own iPhone. Then:
./install-agent.shThe installer adds one tagged /etc/hosts entry, installs a per-user
LaunchAgent, and starts the bridge as the logged-in user. Logs are written to
~/Library/Logs/iphone-tailnet-bridge/.
Verify the connection:
xcrun devicectl list devicesThe device should appear as paired and available. Build and install using the normal project workflow or directly with Apple's tools:
xcrun devicectl device install app --device '<device-id>' '/absolute/path/App.app'
xcrun devicectl device process launch --device '<device-id>' 'com.example.app'Once the bridge is working, ChatGPT Remote can steer the Mac without opening Xcode on the phone or remotely controlling the Mac's desktop. Give ChatGPT the project and use the reusable prompt in CHATGPT-PROMPT.md.
The prompt tells the agent to use the physical paired iPhone, run the project's real build command, install the signed app, launch it, and report build, installation, and launch separately. It also tells the agent not to print or modify the private bridge configuration.
- If the Mac's
en0address changes, run./bridge.sh --prepare-hostsand restart the LaunchAgent. - If CoreDevice requests a port outside the configured ranges, add only a bounded range around the observed port and restart. Do not open thousands of listeners blindly.
- If the device is unavailable, confirm Wi-Fi association, Tailscale status, the phone is unlocked, and the bridge logs before pairing again.
- If pairing identity or TXT values change after an OS update, repeat capture.
Stop and remove the bridge with:
./teardown.shMIT. See LICENSE.