RU
🛠️ Building with AI

My iPhone Dev Builds Install Over 5G Now. It Was an HTTPS Problem All Along

Trying a fresh build of my Unity game used to mean the desk: a cable or the same Wi-Fi and an unlocked phone. TestFlight meant a queue. Now the Mac signs with my development profile, Tailscale Serve gives it real HTTPS, and Safari installs the build with one tap. No Ad Hoc profile.

I tap one button in Safari, on the tram, over 5G, and the build my Mac just made installs on my iPhone.

Until this week, feeling a change on the real phone meant going back to the desk: cable or same Wi-Fi, phone unlocked. Or a TestFlight upload and a wait for processing.

I’m building a small 3D game in Unity, with Claude Code doing most of the typing. The loop I care about is “change something, feel it on the phone”. Fixing that loop taught me two things. The obstacle was HTTPS, and I didn’t need an Ad Hoc profile: iOS installs a development-signed build over the air on any device its profile lists.

It took one shell script, a static folder and a Tailscale feature I hadn’t used before.

How builds reached the phone before

A phone tethered to a laptop by a short cable with a leash loop, a padlock on its screen

  1. 1

    16 Oct, night

    Signed device build from the command line

    Xcode had no Apple ID logged in, so Claude registered the phone and created a development profile through the App Store Connect API. Unity → xcodebuild → devicectl install.

  2. 2

    17 Oct

    On-device benchmark

    The first run failed because the phone was locked. The script now spots that and asks me to unlock it.

  3. 3

    20 Oct

    "I don't see the build on my iPhone"

    It had gone to my other iPhone. The second one needed a cable, an unlock and Developer Mode before devicectl could mount its disk image.

  4. 4

    21 Oct

    Over the air through Tailscale Serve

    One tap in Safari, from anywhere. Kept.

Each step worked, and each one tied the build to the desk a little less.

Every install needed the phone near the Mac and in a cooperative mood. I wanted to build at home and try it on the tram.

What I skipped

TestFlight works, but it puts App Store Connect processing between me and each build. I rebuild this prototype many times a day and didn’t want a queue.

I also skipped Xcode’s wireless debugging over the VPN. I wanted a plain file download, and I didn’t want to find out how Xcode’s device discovery behaves across a tailnet.

An Ad Hoc profile I’d assumed I needed. I didn’t: my phone was already in the development profile, and that profile is enough.

How it works now

  1. Macbuild + signUnity → Xcode, development profile
  2. Mac.ipa + manifestBuilds/OTA, local server :8743
  3. Tailscale ServeHTTPS, tailnet onlyreal certificate, *.ts.net
  4. iPhone · 5GSafari → Installitms-services:// link
  5. iOSinstalls the appits own OTA installer
No cable, no TestFlight, no public URL. The phone only needs Tailscale on and the Mac awake.

iOS has a built-in installer for apps distributed outside the App Store. You give Safari a link like itms-services://?action=download-manifest&url=…, the manifest points to an .ipa, and iOS installs it. The catch: both files must come over HTTPS with a certificate the phone trusts. On a home Mac, that’s the hard part.

Tailscale Serve handles it. The Mac gets an address like https://my-mac.my-tailnet.ts.net/ with a valid certificate, reachable only from devices on my tailnet. Nothing is public. On the phone, I switch the Tailscale app on.

The install page in Safari: the game title, a big green Install button, and a line with build time, commit and size
The install page (illustration). The line under the button says which build it is: time, commit, size.

The script

Tools/ota.sh in the game’s repo, 84 lines of bash. The core:

Tools/ota.sh (core)
# Build for any iPhone in the profile; no phone needs to be connected.
Tools/ios.sh any build # xcodebuild ... -destination generic/platform=iOS
# The .ipa is the signed .app in Payload/, zipped. Written aside, then moved,
# so a phone mid-download keeps the old file whole.
mkdir "$TMP/Payload" && cp -R "$APP" "$TMP/Payload/"
(cd "$TMP" && zip -qry "$OTA/$NAME.ipa.part" Payload)
mv "$OTA/$NAME.ipa.part" "$OTA/$NAME.ipa"
# URLs carry a build stamp, so neither Safari nor the installer takes a cached copy.
STAMP="$(date +%Y%m%d%H%M%S)"
# manifest.plist and index.html are heredocs; the page's button is this link:
# itms-services://?action=download-manifest&url=https://$HOST/manifest.plist?b=$STAMP

The one-time setup is a tiny local web server, kept alive as a LaunchAgent, with Tailscale Serve in front of it.

Tools/ota.sh serve (core)
# The LaunchAgent runs python's http.server, bound to localhost only; launchd restarts it if it dies.
python3 -c 'import functools, http.server as h; H = h.SimpleHTTPRequestHandler;
H.extensions_map.update({".plist": "text/xml", ".ipa": "application/octet-stream"});
h.ThreadingHTTPServer(("127.0.0.1", 8743), functools.partial(H, directory="Builds/OTA")).serve_forever()'
tailscale serve --bg 8743 # https://<this mac>.<tailnet>.ts.net/ → localhost:8743

Where it bit

A small toolbox holding a broom sweeping stale cards, a half-filled download bar and a toggle switch with a key

The first tailscale serve stopped me: HTTPS has to be enabled for the tailnet, and only the account owner can switch it on in the admin console. Claude couldn’t click that for me. I did, and the rest ran.

The smaller traps I closed in the script before they could cost me a morning:

  • MIME type. Python’s server sent the manifest as application/octet-stream, and the install didn’t start. One extensions_map entry serves .plist as text/xml.
  • Caching. Without a build stamp in the URLs, Safari or the installer can hand you the previous build.
  • Half-written files. A phone downloading during a rebuild could get a broken .ipa. Write to .part, then mv.

My real doubt was iOS itself: would the system installer fetch from a private *.ts.net address through a VPN? It does.

What changed for me

I used to file “install on device” under things that happen at a desk. Tailscale Serve turned the HTTPS requirement into one command. If you already run Tailscale, the rest is a folder, a manifest and a button.

My favourite part is the line under the button. It names the commit I’m about to play and adds a + if Assets or Tools had uncommitted changes. When something feels off on the phone, I know which build to blame.

Build your own

The script is open source, stripped of anything specific to my game: point it at any signed .app.

vasilinoff/ios-ota-tailscale

Install iOS development builds on your iPhone from anywhere (5G included) via Tailscale Serve + iOS OTA

Shell★ 1⑂ 0updated 21 Oct 2026
View on GitHubgit clone https://github.com/vasilinoff/ios-ota-tailscale

Or paste this into Claude Code:

prompt.md
Set up over-the-air installs of my iOS app's development builds from this Mac, reachable only from my tailnet.
Ask before anything that changes system settings.
1. Build for generic/platform=iOS with my development profile (no device connected), then pack the signed .app
into Payload/ and zip it to Builds/OTA/<App>.ipa (write to .part, then mv).
2. Generate Builds/OTA/manifest.plist (software-package URL, bundle id, version, title) and an index.html with an
itms-services://?action=download-manifest link. Add a build timestamp query to every URL. Show build time,
git commit (+ if dirty) and size under the button.
3. A LaunchAgent running python http.server on 127.0.0.1:<port> for Builds/OTA, with .plist served as text/xml.
4. `tailscale serve --bg <port>`. If HTTPS/Serve isn't enabled on my tailnet, give me the admin link and stop.
5. Print the https://<mac>.<tailnet>.ts.net/ URL to open in Safari on the phone.