How to Get the App Version in Your Expo App

DavidDavid November 16, 2026 7 min read
A smartphone on a pale oak desk beside a small stack of numbered paper luggage tags tied with string and a brass stamp, in soft window light
Original image, App Store Launch Club

How to get the app version in your Expo app, in short

Run npx expo install expo-application. Then import * as Application from 'expo-application' and read Application.nativeApplicationVersion for the version string people see in the store, and Application.nativeBuildVersion for the internal build number. Both are synchronous constants, so you can drop them straight into a Settings row or a support email.

On Android the version is the version name set by version in your app config, and the build number is android.versionCode. On iOS they are the Info.plist values CFBundleShortVersionString and CFBundleVersion, which you set with version and ios.buildNumber. On web both are null.

expo-application at a glance (SDK 58)

QuestionAnswer
Installnpx expo install expo-application
PlatformsAndroid, iOS, tvOS and web
Works in Expo Go?Yes, it is included
Version users seeApplication.nativeApplicationVersion
Build numberApplication.nativeBuildVersion (a string on Android and iOS)
Bundle ID or package nameApplication.applicationId
Home screen nameApplication.applicationName
TestFlight or App Store?await Application.getAppleStoreEnvironmentAsync() (iOS and tvOS)
Install dateawait Application.getInstallationTimeAsync()

Version vs build number: which one to show

Indie builders mix these two up constantly, and it causes real confusion in support threads. The version is the public number, the one in the App Store listing. The build number is the internal number the stores can use to tell different binaries apart, even when they share a version.

Where each value comes from

ValueSet in app configiOS sourceAndroid sourceRead it with
VersionversionCFBundleShortVersionStringVersion namenativeApplicationVersion
Build numberios.buildNumber and android.versionCodeCFBundleVersionVersion codenativeBuildVersion

Why not Constants.expoConfig.version?

expo-constants also exposes your app config as Constants.expoConfig, and plenty of code reads Constants.expoConfig.version. The difference is where the value comes from. In a build, expoConfig is the config embedded at build time. When the app is running an over-the-air update, expoConfig is the config that came with that update. During development it is whatever the dev server serves.

The values in expo-application come from the native binary and never change for a given build. So if you are shipping updates without App Store review, the binary version is the honest answer to the question which app does this person actually have installed. The older Constants fields for the Android version code are deprecated in favour of Application.nativeBuildVersion, and Constants.platform.ios.buildNumber is null in Expo Go.

  • Use Application.nativeApplicationVersion and nativeBuildVersion for anything about the installed app: Settings screens, support emails, crash reports, force update checks.
  • Use Constants.expoConfig when you want your own config values, such as the extra field, or to know what the currently running JavaScript bundle was built with.
  • If you use expo-updates, log the update ID alongside the binary version. Version plus update is what fully describes the code a user is running.

Step 1: Install expo-application

Run npx expo install expo-application. On SDK 58 that installs the 58.1.x line, matched to your SDK. It needs no config plugin and no permissions, and it is included in Expo Go, so the import works on your phone straight away.

Step 2: Show the version on your Settings screen

The pattern is one small helper, for example export const appVersionLabel = () => `Version ${Application.nativeApplicationVersion ?? 'dev'} (${Application.nativeBuildVersion ?? '0'})`. Render it as a quiet line at the bottom of Settings, and include the same string at the end of your support email body so every report arrives labelled.

  • Handle null. Both values are typed string | null and are null on web, so always give a fallback rather than printing the word null.
  • Treat nativeBuildVersion as a string. If you compare build numbers, convert with Number() first, otherwise "9" sorts after "114".
  • Do not hard-code the version in a constants file. It will drift from the real binary the first time you forget to bump it.

Step 3: Tell TestFlight apart from the App Store

getIosApplicationReleaseTypeAsync reports APP_STORE for both a TestFlight build and an App Store release, so it cannot separate testers from real customers. getAppleStoreEnvironmentAsync can. It resolves to one of these values.

getAppleStoreEnvironmentAsync results

ValueWhat it means
'production'An App Store release
'sandbox'A TestFlight build, a build under App Store Review, or a development, ad hoc or enterprise-signed build
'xcode'A build run with a StoreKit configuration file in Xcode
nullNo verified app transaction, for example on a simulator without a StoreKit configuration file, or when the user is offline or signed out of the App Store before StoreKit has cached one

On iOS there is also getIosPushNotificationServiceEnvironmentAsync, which returns 'development' or 'production' based on your aps-environment entitlement, or null on the simulator. It is a quick check when push notifications work in one build and not another.

Step 4: Install dates and device IDs

expo-application also answers a few install-level questions without any backend.

The other expo-application methods

MethodPlatformsWhat to know
getInstallationTimeAsync()Android, iOS, tvOS (null on web)First install time, not counting updates. Uninstall and reinstall resets it
getLastUpdateTimeAsync()AndroidLast time the app was updated from Google Play
getInstallReferrerAsync()AndroidThe Play Store referrer string, which may not be a complete URL. Throws on emulators without the Play Store
getAndroidId()Android (synchronous)Unique per app-signing key, user and device. Changes after a factory reset or a signing key change
getIosIdForVendorAsync()iOSSame ID for all your apps on a device. Can be null right after a restart before unlock, and changes once every app from you is uninstalled

Because the iOS vendor ID can come back null and can change after a reinstall, do not use it as a user account ID. Use it for things like rough install counts, and keep real identity in your auth system. If you need a stable ID you control, generate one with expo-crypto and keep it in SecureStore, as covered in our guides to generating a UUID and storing data securely.

Have Claude Code build it for you

Open your project in the Claude Code desktop app and describe the result. Left alone, AI-written code here tends to hard-code the version, read Constants.expoConfig.version and report the wrong number after an update, compare build numbers as strings, or gate paid features on the sandbox environment. A prompt that heads those off:

Then add a line to your CLAUDE.md such as "App version: always appInfo.ts (expo-application native values), never Constants.expoConfig.version" so later sessions keep following it.

The short version

To get the app version in your Expo app: install expo-application, read nativeApplicationVersion and nativeBuildVersion, and show them together as "Version X (Y)". They describe the installed binary, so they stay correct after an over-the-air update. Use getAppleStoreEnvironmentAsync to spot TestFlight, remember that App Review also reports sandbox, and keep device IDs away from anything that has to identify a person.

If you are building your first iOS app with Claude Code and Expo and want a second set of eyes before App Review, bring it to App Store Launch Club. Members share their builds and help each other get unstuck, and the curriculum covers the full path from first build to first users. Pair this with our guide to submitting an app update to the App Store, which is where the version and build number you set end up. Join at applaunchclub.co for $9 a month.

Free app-building tips, straight to your inbox

Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.

Frequently asked questions

How do I get the app version in an Expo app?

Install expo-application with npx expo install expo-application, import * as Application from 'expo-application' and read Application.nativeApplicationVersion. For the build number, read Application.nativeBuildVersion. Both are synchronous and null on web.

What is the difference between nativeApplicationVersion and nativeBuildVersion?

nativeApplicationVersion is the public version, set by version in your app config (CFBundleShortVersionString on iOS). nativeBuildVersion is the internal build number the stores use to tell binaries apart, set by ios.buildNumber and android.versionCode (CFBundleVersion on iOS, version code on Android).

Should I use Constants.expoConfig.version or expo-application?

Use expo-application for the installed app version. Constants.expoConfig is the config embedded at build time, or the config that came with an over-the-air update when one is running, while the expo-application values come from the native binary and never change for a given build.

How can my Expo app tell if it is running from TestFlight?

On iOS, call await Application.getAppleStoreEnvironmentAsync(). It returns 'sandbox' for TestFlight, and 'production' for an App Store release. Sandbox also covers builds under App Store Review and development builds, so do not use it to change features or pricing.

Does expo-application work in Expo Go?

Yes, it is included in Expo Go. Check your real version and build number in a development build or TestFlight build, because in Expo Go the native app running your code is Expo Go.

Can I use getIosIdForVendorAsync as a user ID?

No. It can return null right after a restart before the device is unlocked, and it changes once every app from your developer account is uninstalled from the device. Keep user identity in your auth system.

Last reviewed by David on November 16, 2026

David

Written by

David

Founder and app builder

Keep reading

ExpoClaude Code

How to Add Notification Actions to Your Expo App

To add notification actions to an Expo app, register a category with Notifications.setNotificationCategoryAsync, give it action buttons (and optionally a text reply), set categoryIdentifier on the notification, then read response.actionIdentifier in a response listener. Here is every action option, how to handle taps when the app was closed, the Android and iOS differences, and a Claude Code prompt that wires it all up.

David 8 min
Read article
ExpoClaude Code

How to Schedule Local Notifications in Your Expo App

To schedule local notifications in an Expo app, install expo-notifications, set a notification handler, ask for permission, create an Android channel, then call scheduleNotificationAsync with your content and a trigger like DAILY, WEEKLY or DATE. Here is every trigger type, how to cancel and list what is scheduled, why Android reminders arrive late, and a Claude Code prompt that builds the whole reminder flow.

David 8 min
Read article

Ready to build it yourself?

Join App Store Launch Club, the #1 community for building and launching apps, for $9/month.

← Back to the blog