Why Apple's itunesstored Fails Behind Cookie Login Walls (and How Signed Tokens Fix It)
Architectural deep dive into why browser session cookies break iOS Over-The-Air manifests and how short-lived HMAC tokens keep protected builds secure yet installable.
Key Takeaway
Because Apple's itunesstored daemon does not share Mobile Safari cookies or Authorization headers, protecting manifest.plist behind login cookies breaks every iOS install. Short-lived HMAC installTokens solve both security and daemon compatibility.
The hidden trap in naive auth-gated OTA servers
Developers building internal app distribution frequently make one classic mistake: they protect GET /manifest.plist and GET /download behind the same HTTP-only session cookie used by their web dashboard. Everything looks fine on desktop browsers during testing—then every iPhone fails with 'Unable to Download App'.
The reason is process isolation on iOS: Mobile Safari displays the page, but the OS daemon itunesstored performs the actual manifest and .ipa network requests completely without Safari's cookie jar or custom headers.
Stateless short-lived cryptographic install tokens
A secure OTA flow separates interactive authorization from daemon delivery:
- GET /api/v1/builds/:shortCode strips raw S3 storage keys and installation tokens whenever a build requires a password, is expired, or hit its maxDownloads cap.
- Once the tester submits the correct build password on /unlock (verified against an Argon2id hash), the API mints a short-lived HMAC-SHA256 installToken scoped strictly to that shortCode and scope.
- The itms-services link passes that cryptographic token to manifest.plist, which embeds time-bounded signed URLs for the app icon and presigned S3 object download.
- Raw object storage bucket keys stay hidden behind short-lived presigned links even during active installs.
Frequently Asked Questions
- How long should an OTA installToken remain valid?
- Short windows (typically 10–15 minutes) balance security with slower cellular downloads while ensuring itunesstored completes manifest lookup and presigned S3 redirection reliably.
Related Guides
Ready to distribute a build?
Upload an .ipa, .apk, or .aab archive or inspect your iPhone UDID directly in Safari.