Skip to content

Date versions for the apps, semantic versions for the APIs

Context and problem

The apps said 0.1 before their first store build. The update feed (app-messaging plan) selects messages by app version, and the server will refuse outdated clients (updateRequired). Both stores constrain the numbers: Apple accepts at most three period-separated non-negative integers in CFBundleShortVersionString, build numbers must increase, and Google Play caps versionCode at 2,100,000,000. Players never see the protocol, but clients and the server must agree on what is a breaking change.

Options considered

  1. Semantic versions everywhere (1.0.0). Familiar, but an app release rarely maps to “major”, and the apps’ numbers carry no meaning for players.
  2. Date versions for the apps, semantic versions for the APIs. The app number says when it shipped; the protocol and feed schema say what is compatible.
  3. Two-part app versions (1.0), as the plan first asked. Leaves no room for a fix release.

Decision

Eduardo chose option 2 on 2026-11-25.

  • Apps: marketing version YYYY.M.D of the release day, without leading zeros (2026.12.3), in MARKETING_VERSION and versionName. A second store release on the same day takes the next day’s date. Build number YYYYMMDDNN, NN the build of that day from 01 (2026120301), in CURRENT_PROJECT_VERSION and versionCode; it fits Play’s limit until the end of 2099. One script sets both apps, and a test fails when they disagree (#226).
  • APIs: the CLI/server protocol and the app-status feed schema use MAJOR.MINOR.PATCH (SemVer 2.0.0). MAJOR for anything an older client cannot handle, MINOR for additions it can ignore, PATCH for fixes. The feed URL carries the schema’s major (v1.json); the hello carries client.protocol.
  • The gate: the server refuses a hello whose protocol major differs from its own, or whose app date version is below that platform’s minimum (HOMEFELT_MIN_CLIENT_VERSIONS).

Consequences

Good

  • Versions compare as three numbers, so date order is version order in the feed and on the server.
  • Anyone can tell how old an installed app is from its version.
  • Compatibility is stated once, by the protocol’s major, not inferred from app numbers.

Bad

  • The app number no longer signals how big a release is; release notes (“What’s new”) carry that.
  • Two releases on one day need the next day’s date, which can look odd.
  • Two numbering schemes to explain in the docs.

More information