Docs · Static Feed & Channel Spec

Static Feed & Channel Spec

Raw Markdown

A Channel is a directory of four static files at one HTTPS location. That is the whole protocol: no dynamic application is required, any static host works, and the Host App reads one small JSON file to decide whether an update exists.

This chapter explains the contract for people who publish with the iosparkle tool or write their own publisher. The normative, self-contained version — with the JSON Schema, full test vectors, and a verification checklist — is docs/agent/channel-spec.md. Both describe the same protocol; when in doubt, that file is the reference.

The Channel directory

https://ota.example.com/my-app-dev/
├── feed.json         the Feed: what the current build is
├── manifest.plist    how iOS installs it
├── app-118.ipa       the package itself
└── index.html        first-time install page
FilePurposeReplaced by each publish
feed.jsonThe Feed, a v1 JSON document with the current build's metadata.Yes
manifest.plistThe install manifest that iOS reads to locate and verify the package.Yes
app-<build>.ipaThe package, named after its build number.No — a new build gets a new file
index.htmlLanding page for installing the first build from Safari.Yes

Naming and retention

The package is app-<build>.ipa, where <build> is the package's CFBundleVersion: app-118.ipa. The name never changes for a given build, and the file at that name never changes its contents. That buys two things at once:

Each publish keeps the new package and the previous ones you choose to retain; iosparkle publish keeps two by default (--keep-builds <N>) and removes older app-<digits>.ipa files. Files with other names in the directory are left untouched.

Publishing atomically

The Feed must never point at a file that is not there yet. Either write the Channel to a staging directory and switch it in with a single rename, or upload in this order: the package, then manifest.plist, then feed.json, then index.html. iosparkle publish stages and renames for both --out and --ssh.

Addressing

The Host App is configured with the Channel URL, with or without a trailing slash, and reads <channel URL>feed.json. Keep the URL free of query strings and fragments; a secret path prefix is the supported way to make a Channel hard to find (see Self-Hosting & Private Channels).

feed.json v1

The minimal Feed carries four required fields:

{
  "schemaVersion": 1,
  "bundleId": "com.example.myapp.dev",
  "version": "1.4.0",
  "build": 118
}

Every optional field, plus an unknown key that readers ignore:

{
  "schemaVersion": 1,
  "bundleId": "com.example.myapp.dev",
  "version": "1.4.0",
  "build": 118,
  "manifestURL": "https://ota.example.com/my-app-dev/manifest.plist",
  "publishedAt": "2026-12-05T09:30:00.125Z",
  "commit": "79806e2e",
  "minimumOSVersion": "17.0",
  "releaseNotes": "Plain-text summary",
  "sizeBytes": 25629710,
  "sha256": "350930f5c6afe8738841fef0da90d968309033bcb5fb7e584bb96620e5df5a48",
  "futureHint": "ignored"
}

Fields

FieldTypeRequiredMeaning
schemaVersionintegerYes1. A reader that sees a larger number ignores the Feed instead of failing: it is written for a newer protocol.
bundleIdstringYesThe package's CFBundleIdentifier. A Host App ignores a Feed whose bundleId is not its own, which keeps two apps or variants from crossing updates.
versionstringYesThe package's CFBundleShortVersionString, shown to the user. Never compared.
buildintegerYesThe package's CFBundleVersion, >= 1. An update exists exactly when build is greater than the running app's build number.
manifestURLstringNoAbsolute https URL of the manifest. Omit it for a static Channel, where manifest.plist sits beside the Feed. A private Channel sets it to a short-lived link.
publishedAtstringNoISO 8601 timestamp, such as 2026-12-05T09:30:00Z.
commitstringNoSource revision. The first seven characters are shown.
minimumOSVersionstringNoDot-separated version, such as 17.0. Devices below it are never offered the update.
releaseNotesstringNoPlain text. Markup is never rendered.
sizeBytesintegerNoPackage size in bytes.
sha256stringNo64 lowercase hex characters: the SHA-256 of the whole package.

Rules that are easy to get wrong

A Feed that breaks one of the format rules is not an error the user sees: the Host App ignores it and keeps whatever it knew before. iosparkle next-build and iosparkle verify exit non-zero instead, which is why they belong in a publishing pipeline.

manifest.plist

The manifest is the document Apple's wireless installation format requires. This is the complete structure the iosparkle tool generates:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>items</key>
  <array>
    <dict>
      <key>assets</key>
      <array>
        <dict>
          <key>kind</key><string>software-package</string>
          <key>url</key><string>https://ota.example.com/my-app-dev/app-118.ipa</string>
        </dict>
      </array>
      <key>metadata</key>
      <dict>
        <key>bundle-identifier</key><string>com.example.myapp.dev</string>
        <key>bundle-version</key><string>1.4.0</string>
        <key>kind</key><string>software</string>
        <key>platform-identifier</key><string>com.apple.platform.iphoneos</string>
        <key>title</key><string>MyApp Dev</string>
      </dict>
    </dict>
  </array>
</dict>
</plist>
KeyValue
items[0].assets[0].kindAlways software-package.
items[0].assets[0].urlAbsolute https URL of the package.
items[0].metadata.bundle-identifierMust equal bundleId in the Feed. iOS matches the installed app by it, which is what lets an update replace the app in place and keep its data.
items[0].metadata.bundle-versionThe Feed's version.
items[0].metadata.kindAlways software.
items[0].metadata.platform-identifierAlways com.apple.platform.iphoneos.
items[0].metadata.titleShown in the iOS install dialog.

Values are XML text, so they are entity-escaped: & → &amp;, < → &lt;, > → &gt;, " → &quot;, ' → &apos;, with & done first. This is the only escaping applied to the package URL inside the manifest; it is not URL-encoded there.

Why there is no md5 or sha256 here

The publisher's integrity check lives in the Feed instead: sha256 and sizeBytes describe the whole package, and iosparkle verify compares them with what the Channel actually serves.

The Host App starts an installation by opening this URL:

itms-services://?action=download-manifest&url=<encoded manifest URL>

iOS decodes the url parameter once and fetches the result. The encoded value is therefore the complete manifest URL with every byte percent-encoded except the RFC 3986 unreserved characters A-Z a-z 0-9 - . _ ~.

Because the whole URL is encoded this way, anything the manifest URL had already encoded is encoded a second time — hence double encoding. A SigV4 credential's %2F becomes %252F; & becomes %26; + becomes %2B; = becomes %3D. One decode recovers the original URL byte for byte, and the signature or token in it survives.

The alternative fails in a way that is easy to miss. If &, =, and + are left bare — which is what Swift's CharacterSet.urlQueryAllowed does, because it describes a whole query string and not one value — the outer parser ends the url parameter at the first &. iOS requests a truncated manifest URL and the origin answers 403.

Test vectors

These are the reference vectors; every encoder must reproduce them exactly.

[
  {
    "manifestURL": "https://ota.example.com/my-app-dev/manifest.plist",
    "encodedURL": "https%3A%2F%2Fota.example.com%2Fmy-app-dev%2Fmanifest.plist",
    "itmsURL": "itms-services://?action=download-manifest&url=https%3A%2F%2Fota.example.com%2Fmy-app-dev%2Fmanifest.plist"
  },
  {
    "manifestURL": "https://s3.ota.example.com/channels/my%20app/manifest.plist?X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20261205%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=deadbeef&token=a+b=c%2Fd",
    "encodedURL": "https%3A%2F%2Fs3.ota.example.com%2Fchannels%2Fmy%2520app%2Fmanifest.plist%3FX-Amz-Credential%3DAKIAIOSFODNN7EXAMPLE%252F20261205%252Fus-east-1%252Fs3%252Faws4_request%26X-Amz-Signature%3Ddeadbeef%26token%3Da%2Bb%3Dc%252Fd",
    "itmsURL": "itms-services://?action=download-manifest&url=https%3A%2F%2Fs3.ota.example.com%2Fchannels%2Fmy%2520app%2Fmanifest.plist%3FX-Amz-Credential%3DAKIAIOSFODNN7EXAMPLE%252F20261205%252Fus-east-1%252Fs3%252Faws4_request%26X-Amz-Signature%3Ddeadbeef%26token%3Da%2Bb%3Dc%252Fd"
  },
  {
    "manifestURL": "https://r2.ota.example.com/channels/my app/manifest.plist?X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20261205%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=deadbeef&token=a+b=c%2Fd&label=release%20candidate",
    "encodedURL": "https%3A%2F%2Fr2.ota.example.com%2Fchannels%2Fmy%20app%2Fmanifest.plist%3FX-Amz-Credential%3DAKIAIOSFODNN7EXAMPLE%252F20261205%252Fus-east-1%252Fs3%252Faws4_request%26X-Amz-Signature%3Ddeadbeef%26token%3Da%2Bb%3Dc%252Fd%26label%3Drelease%2520candidate",
    "itmsURL": "itms-services://?action=download-manifest&url=https%3A%2F%2Fr2.ota.example.com%2Fchannels%2Fmy%20app%2Fmanifest.plist%3FX-Amz-Credential%3DAKIAIOSFODNN7EXAMPLE%252F20261205%252Fus-east-1%252Fs3%252Faws4_request%26X-Amz-Signature%3Ddeadbeef%26token%3Da%2Bb%3Dc%252Fd%26label%3Drelease%2520candidate"
  },
  {
    "manifestURL": "https://ota.example.com/Az09-._~/café/清單.plist?extras=!$'()*+#preview",
    "encodedURL": "https%3A%2F%2Fota.example.com%2FAz09-._~%2Fcafe%CC%81%2F%E6%B8%85%E5%96%AE.plist%3Fextras%3D%21%24%27%28%29%2A%2B%23preview",
    "itmsURL": "itms-services://?action=download-manifest&url=https%3A%2F%2Fota.example.com%2FAz09-._~%2Fcafe%CC%81%2F%E6%B8%85%E5%96%AE.plist%3Fextras%3D%21%24%27%28%29%2A%2B%23preview"
  }
]

Reference implementations

Swift — byte-exact, and the algorithm iOSparkle itself uses:

import Foundation

/// Percent-encodes every UTF-8 byte except the RFC 3986 `unreserved` set.
func percentEncode(_ value: String) -> String {
    let hex = Array("0123456789ABCDEF".utf8)
    var encoded: [UInt8] = []
    encoded.reserveCapacity(value.utf8.count)
    for byte in value.utf8 {
        switch byte {
        case 0x41...0x5A, 0x61...0x7A, 0x30...0x39, 0x2D, 0x2E, 0x5F, 0x7E:  // A-Z a-z 0-9 - . _ ~
            encoded.append(byte)
        default:
            encoded.append(0x25)  // %
            encoded.append(hex[Int(byte >> 4)])
            encoded.append(hex[Int(byte & 0x0F)])
        }
    }
    return String(decoding: encoded, as: UTF8.self)
}

func installURL(for manifestURL: String) -> String {
    "itms-services://?action=download-manifest&url=\(percentEncode(manifestURL))"
}

Python:

from urllib.parse import quote

def percent_encode(value: str) -> str:
    """Percent-encode every UTF-8 byte except RFC 3986 unreserved characters."""
    return quote(value, safe="")  # the default safe="/" would leave slashes bare

def install_url(manifest_url: str) -> str:
    return f"itms-services://?action=download-manifest&url={percent_encode(manifest_url)}"

JavaScript and TypeScript:

/** Percent-encode every UTF-8 byte except RFC 3986 unreserved characters. */
function percentEncode(value: string): string {
  return encodeURIComponent(value).replace(/[!'()*]/g, (c) =>
    "%" + c.charCodeAt(0).toString(16).toUpperCase()
  );
}

function installURL(manifestURL: string): string {
  return `itms-services://?action=download-manifest&url=${percentEncode(manifestURL)}`;
}

POSIX shell, using only printf, od, tr, and awk:

# POSIX sh. percent_encode "<manifest url>" prints the encoded value.
percent_encode() {
  printf '%s' "$1" \
    | LC_ALL=C od -An -v -tx1 \
    | LC_ALL=C tr -s ' \n' '\n\n' \
    | LC_ALL=C awk 'NF == 0 { next }
      {
        h = tolower($1) ""              # compare as text, not as a number
        if ((h >= "30" && h <= "39") || (h >= "41" && h <= "5a") || (h >= "61" && h <= "7a") ||
            h == "2d" || h == "2e" || h == "5f" || h == "7e") {
          n = index("0123456789abcdef", substr(h, 1, 1)) - 1
          n = n * 16 + index("0123456789abcdef", substr(h, 2, 1)) - 1
          printf "%c", n
        } else {
          printf "%%%s", toupper(h)
        }
      }'
}

install_url() {
  printf 'itms-services://?action=download-manifest&url=%s\n' "$(percent_encode "$1")"
}

index.html

Safari installs an app only through the itms-services:// link, so the landing page exists to offer one. It shows the title, version, bundle ID, and release notes, and carries an inline QR code of the Channel URL so a device can open it with the Camera app. Inside the HTML, the link's literal & before url= is written as &amp;:

<a href="itms-services://?action=download-manifest&amp;url=https%3A%2F%2Fota.example.com%2Fmy-app-dev%2Fmanifest.plist">Install</a>

What the origin must send

The files are static, but a few response headers are part of the contract. The system installer — not the Host App — fetches the manifest and the package, with no headers of its own and no certificate exceptions.

FileContent-TypeCache-ControlAlso required
feed.jsonapplication/json; charset=utf-8no-store—
manifest.plisttext/xmlno-storeServe with 200; do not redirect.
app-<build>.ipaapplication/octet-streampublic, max-age=31536000, immutableExact Content-Length, Accept-Ranges: bytes with 206 responses, and no dynamic compression.
index.htmltext/html; charset=utf-8no-cache—

Everything is HTTPS with a publicly trusted certificate. Self-Hosting & Private Channels explains why each header matters, how to configure common hosts, and how to run a private Channel.

Checking a published Channel

iosparkle verify reads the Feed, fetches the manifest it points to, checks that the manifest agrees with the Feed, then streams the package and compares its size and SHA-256:

iosparkle verify --channel-url https://ota.example.com/my-app-dev --ipa MyAppDev.ipa

It uses GET only, so it works on presigned package URLs as well as static ones. See CLI & App Store Audit for every option.

Copy manually