Skip to content
Gates

Targeting by Expo runtime

The SDK reads the device’s runtime once and sends it with every sync. Rules are compiled into the snapshot and matched on the phone, so targeting works offline.

What the device reports

FieldSourceNotes
platformReact Native Platform.OS"ios" or "android".
applicationIdexpo-applicationiOS bundle identifier or Android application id. Shown in Project settings → Connected apps.
appVersionexpo-application nativeApplicationVersionThe store version, e.g. 2.4.1.
buildVersionexpo-application nativeBuildVersionThe build number, e.g. 83.
runtimeVersionexpo-updatesWhich OTA updates the binary can run.
updateIdexpo-updatesThe OTA update currently running, or null.
isEmbeddedLaunchexpo-updatestrue for the bundle embedded in the binary, false for an OTA update, null when expo-updates is disabled. Reported, not targetable.

Attributes a rule can match

AttributeOperatorsComparison
platformeq, neqString equality.
appVersioneq, neq, gte, lteReal version comparison, never lexicographic (below).
buildVersioneq, neq, gte, lteNumeric when both sides are integers, otherwise string order.
runtimeVersioneq, neqEquality only in v0; runtime versions are not guaranteed to be semver.
updateIdeq, neqEquality.
user.ideq, neqThe identified user.
user.<trait>eq, neqAny trait passed to identify, compared as a string.
audienceeq, neqMembership of a saved audience. See People.

All conditions in a rule AND together. Rules are tried in priority order and the first whose conditions all match decides.

A missing attribute never matches, except for neq: “not equal to X” is true of a device that has no value at all. gte and lte on an attribute that is not ordered behave as equality.

How appVersion compares

  • Numeric dot-segments compare numerically: 2.10.0 is greater than 2.9.0.
  • Missing segments read as zero: 2.4 equals 2.4.0.
  • A pre-release suffix sorts before the release it precedes: 2.4.0-beta.1 is less than 2.4.0.
  • A leading v is ignored. Anything unparsable falls back to a plain string comparison rather than throwing inside evaluation.

Example

Ship a feature only to iOS users on the 2.4 line who are running an OTA update, not the embedded bundle you cannot patch:

platform      eq   ios
appVersion    gte  2.4.0
appVersion    lte  2.4.99
updateId      neq  (empty)