Hello
I’m using expo with expo-updates and I tried to create build version string like this: {app_version} - {channel} - {updateId}
my function:
import Constants from 'expo-constants';
import * as ExpoUpdates from 'expo-updates';
const buildVersionString = () => {
const version = get(Constants, 'expoConfig.version', 'no-data');
const channel = get(ExpoUpdates, 'channel', 'no-data');
const updateId = get(ExpoUpdates, 'updateId', 'no-data');
if (channel === '') return `${version} - dev`;
const versionString = `${version} - ${channel}`;
if (updateId === '') return versionString;
return `${versionString} (${updateId})`;
};
This code return the valid “app version” but always with “dev” and no updateId