[docs] TauriPlatforms: Review, measurements on the tablet and Windows, lessons, gaps

This commit is contained in:
2026-11-17 19:02:04 +01:00
parent 9e3d389f82
commit b2b50efd90
9 changed files with 256 additions and 16 deletions
+27
View File
@@ -83,3 +83,30 @@ that was imagined, not the one that was built.
**How to apply it.** Before acting on a predicted trap, write the test that would show it, run it
against the built app, and fix what fails. Then rewrite the trap's row with what was measured.
## A generated project is newer than anything you made before it
**What happened.** The first Android APK (2026-11-17) carried Tauri's logo. `scripts/icons.ts` copied
Rosea's icons only when the target was older than `icon.svg`, but `tauri android init` had just
written its own icon into `gen/android`, newer than both.
**Why it bit.** A date check answers "has the source changed since?", not "is this file mine?". A
generator that runs later wins every date comparison.
**How to apply it.** Copy what must survive a generator unconditionally, and check it by content
(`android.ts check` compares the icon's bytes). Then look at the artefact: the APK's own icon was
hashed against ours.
## The proof of an app's permissions is the built package
**What happened.** Following Amicitia (its lessons/technical.md), `pnpm tauri:android` ends by reading
the APK with `aapt2 dump permissions` and `dump xmltree`, and the device check reads
`dumpsys package` on the tablet. The source manifest was right; the APK also held a
`DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION` that the source never mentions (androidx merges it).
**Why it bit.** The manifest merge adds what libraries declare. A check on the source would never see
a permission a library adds.
**How to apply it.** Check permissions, backup flags and WebView switches on the APK and on the
installed package, and name each allowed exception precisely (this package's own receiver guard,
not any app's).