Skip to content
TypeScript

fix(mobile): crash report shows the store build number (#16052)

Mohamed Akef00f53d68e179
diff --git a/apps/mobile/package.json b/apps/mobile/package.json
index 0dc5b7fab77..e0c3567b725 100644
--- a/apps/mobile/package.json
+++ b/apps/mobile/package.json
@@ -84,6 +84,7 @@
"diff": "8.0.3",
"effect": "catalog:",
"expo": "58.0.14",
+ "expo-application": "~58.1.2",
"expo-asset": "~58.0.16",
"expo-audio": "58.0.9",
"expo-auth-session": "~58.0.13",
diff --git a/apps/mobile/src/features/diagnostics/SettingsDiagnosticsRouteScreen.tsx b/apps/mobile/src/features/diagnostics/SettingsDiagnosticsRouteScreen.tsx
index b6ca617cf0d..f8fa7429aab 100644
--- a/apps/mobile/src/features/diagnostics/SettingsDiagnosticsRouteScreen.tsx
+++ b/apps/mobile/src/features/diagnostics/SettingsDiagnosticsRouteScreen.tsx
@@ -1,9 +1,10 @@
import { AppActivityIndicator } from "../../components/ui/AppActivityIndicator";
import { ScreenScrollView as ScrollView } from "../../components/ui/ScreenScrollView";
+import * as Application from "expo-application";
import Constants from "expo-constants";
import * as Updates from "expo-updates";
import { useEffect, useState } from "react";
-import { Platform, View } from "react-native";
+import { View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { SymbolView } from "../../components/ui/AppSymbol";
@@ -30,10 +31,9 @@ type CrashLogState =
function appIdentity() {
return {
version: Constants.expoConfig?.version ?? "0.0.0",
- build:
- (Platform.OS === "ios"
- ? Constants.platform?.ios?.buildNumber
- : Constants.platform?.android?.versionCode?.toString()) ?? "dev",
+ // EAS assigns build numbers remotely, so expo-constants never sees them;
+ // only the installed binary knows its own.
+ build: Application.nativeBuildVersion ?? "dev",
};
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 57f0a3ad9f8..741001ee908 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -431,6 +431,9 @@ importers:
expo:
specifier: 58.0.14
version: 58.0.14(1106b1d11fc0fad6d0556b6a93329d99)
+ expo-application:
+ specifier: ~58.1.2
+ version: 58.1.2([email protected])
expo-asset:
specifier: ~58.0.16