Read app.json (or exp.json) programmatically
For expo SDK 33 use:
import Constants from "expo-constants";
{`v${Constants.manifest.version}`}
You can access this through Constants.manifest
. This includes your app.json config without any of the potentially sensitive information such as API secret keys.
import Constants from 'expo-constants';
Constants.manifest.version
For Expo SDK 35, I did this:
expo install expo-constants
in your .js:
import Constants from "expo-constants";
<Text> {Constants.manifest.description} </Text>
Newer versions of expo (I'm on 36) now import the variable differently
import Constants from 'expo-constants';
Read all about it here on the expo documentation site