Skip to content

Commit 20391cd

Browse files
committed
Explain why appVersion is explicit on the web and always will be
1 parent 0579498 commit 20391cd

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- `appVersion` stays required, while the Swift and Flutter SDKs now detect it.
6+
A browser has no bundle and no installed version to read: the build is the
7+
only thing that knows which build is running. Documented in the README.
8+
39
## 0.1.0
410

511
First release.

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ switch (decision.type) {
5151
}
5252
```
5353

54+
`appVersion` is explicit here and always will be. The Swift and Flutter SDKs
55+
read the installed version from the bundle, but a browser has no bundle and no
56+
installed version to read — the only thing that knows which build is running is
57+
the build itself, so it has to hand the string over. Every bundler can: Vite's
58+
`define`, webpack's `DefinePlugin`, or an env var read at build time.
59+
60+
Pass a semantic version, not a commit SHA. The rules are ordered as semantic
61+
versions, and anything that is not one is treated as no opinion — which lets the
62+
app run rather than walling it, but also means your rules do nothing.
63+
5464
## What `force` means on the web
5565

5666
On mobile it means "this binary is stale, go to the store". On the web there is

0 commit comments

Comments
 (0)