mirror of
https://github.com/linagora/tmail-flutter.git
synced 2026-12-06 16:04:20 +00:00
- Add breadcrumb after foreground check so it only fires on background processing - Fix ADR and CI/Fastfile comments: pubspec is always X.Y.Z, no -rc suffix
1.9 KiB
1.9 KiB
0084. Sentry Release Version Strategy (Mobile)
Date: 2026-04-22
Status
Accepted
Context
Scope: iOS and Android mobile only. Web uses a separate Sentry project and version injection mechanism.
Sentry requires the release version reported by the app to exactly match the release version used when uploading debug symbols (dSYMs / source maps). A mismatch breaks symbolication — crash stack traces become unreadable.
There are three version sources that must stay in sync:
- Git tag — Fastlane reads this via
last_git_tagand injects it asSENTRY_RELEASEinto the app viadart-define(base64-encodedDART_DEFINES) pubspec.yamlversion — used by CI only for base-version validation; not used asSENTRY_RELEASECFBundleShortVersionString(iOS) — derived from pubspec; Apple requiresX.Y.Zformat only — no-rcsuffix allowed
The challenge: RC builds use a -rcXX suffix in the tag (e.g. v0.28.5-rc01), but Apple rejects that suffix in CFBundleShortVersionString.
Decision
Rule: pubspec version = git tag base version (no -rc suffix). The pubspec version is used as SENTRY_RELEASE in both the app and CI.
| Source | RC build example | Final release example |
|---|---|---|
| Git tag | v0.28.5-rc01 |
v0.28.5 |
| pubspec version | 0.28.5 |
0.28.5 |
| App Store / CFBundleShortVersionString | 0.28.5 ✅ |
0.28.5 ✅ |
| SENTRY_RELEASE (app + CI) | 0.28.5 |
0.28.5 |
What breaks if you deviate
| Mistake | Result |
|---|---|
pubspec = 0.28.5-rc01, tag = v0.28.5-rc01 |
Apple rejects the iOS build (CFBundleShortVersionString must be X.Y.Z) |
pubspec = 0.28.5-rc01, tag = v0.28.5 |
Validation passes but app reports "0.28.5", CI uploads to "0.28.5-rc01" → mismatch |
Consequences
- pubspec always stays App Store-safe (
X.Y.Z, no suffix) - RC distinction lives only in the git tag
- CI validates base version consistency; pubspec version drives
SENTRY_RELEASE