Check whether this app version may run
Call before sign-in and on every resume. No credentials: any
Authorization header is ignored, so an expired session cannot
make the check fail.
The client rule. Stop the app only when the response is 200
with status = blocked, and show message with a link to the
store. Everything else means carry on as if ok: no network, a
timeout, any 4xx (including 429), any 5xx, a body that does
not parse, or a status this build does not recognise. A
generated client that throws on an unknown enum value must catch
that and carry on too. On update_available, offer the update
and let the user continue.
The server fails open the same way: when the owner’s
configuration is missing or invalid, the answer is ok.
Versions are MAJOR.MINOR.PATCH, compared numerically
(1.10.0 is newer than 1.9.0). The build number — +BUILD in
version, or build — does not affect ordering; it only matters
when a single build has been kill-switched. Send it whenever you
have it. Digits are ASCII only.
Encode the +. In a query string a bare + means a space,
so send 1.4.2+57 as version=1.4.2%2B57 — or pass the build
separately as build=57. The server also accepts a bare +,
but don’t rely on it.
Responses are cacheable for 60 seconds (Cache-Control: public, max-age=60).
Query parameters
The installed version (CFBundleShortVersionString / versionName), optionally with +BUILD. The value shown is decoded; on the wire the + is %2B.
The build number (CFBundleVersion / versionCode), when not already in version. Must match it when both are sent.
Response headers
Response
blocked stops the app; update_available offers an update and lets the user carry on; ok carries on. More values may be added — treat one this build does not recognise as ok.
Why the app is blocked; null unless status is blocked.
Plain text for the blocked screen, at most 280 characters; null unless status is blocked.
The version checked, MAJOR.MINOR.PATCH.