diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/app-info.ts | 8 | ||||
-rw-r--r-- | src/lib/hooks/useOTAUpdates.ts | 4 | ||||
-rw-r--r-- | src/lib/sentry.ts | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/app-info.ts b/src/lib/app-info.ts index 3071e031b..83406bf2e 100644 --- a/src/lib/app-info.ts +++ b/src/lib/app-info.ts @@ -1,9 +1,9 @@ -import VersionNumber from 'react-native-version-number' +import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application' export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development' export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight' const UPDATES_CHANNEL = IS_TESTFLIGHT ? 'testflight' : 'production' -export const appVersion = `${VersionNumber.appVersion} (${ - VersionNumber.buildVersion -}, ${IS_DEV ? 'development' : UPDATES_CHANNEL})` +export const appVersion = `${nativeApplicationVersion} (${nativeBuildVersion}, ${ + IS_DEV ? 'development' : UPDATES_CHANNEL +})` diff --git a/src/lib/hooks/useOTAUpdates.ts b/src/lib/hooks/useOTAUpdates.ts index 181f0b2c6..51fd18aa0 100644 --- a/src/lib/hooks/useOTAUpdates.ts +++ b/src/lib/hooks/useOTAUpdates.ts @@ -1,6 +1,6 @@ import React from 'react' import {Alert, AppState, AppStateStatus} from 'react-native' -import app from 'react-native-version-number' +import {nativeBuildVersion} from 'expo-application' import { checkForUpdateAsync, fetchUpdateAsync, @@ -21,7 +21,7 @@ async function setExtraParams() { isIOS ? 'ios-build-number' : 'android-build-number', // Hilariously, `buildVersion` is not actually a string on Android even though the TS type says it is. // This just ensures it gets passed as a string - `${app.buildVersion}`, + `${nativeBuildVersion}`, ) await setExtraParamAsync( 'channel', diff --git a/src/lib/sentry.ts b/src/lib/sentry.ts index d0a5fe0fd..6b6c1832d 100644 --- a/src/lib/sentry.ts +++ b/src/lib/sentry.ts @@ -4,7 +4,7 @@ */ import {Platform} from 'react-native' -import app from 'react-native-version-number' +import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application' import * as info from 'expo-updates' import {init} from 'sentry-expo' @@ -21,7 +21,7 @@ const buildChannel = (info.channel || 'development') as * - `dev` * - `1.57.0` */ -const release = app.appVersion ?? 'dev' +const release = nativeApplicationVersion ?? 'dev' /** * Examples: @@ -33,7 +33,7 @@ const release = app.appVersion ?? 'dev' * - `android.1.57.0.46` */ const dist = `${Platform.OS}.${release}${ - app.buildVersion ? `.${app.buildVersion}` : '' + nativeBuildVersion ? `.${nativeBuildVersion}` : '' }` init({ |