Configuration Files
Expo supports three types of configuration files:- app.json - Static JSON configuration
- app.config.js - Dynamic JavaScript configuration
- app.config.ts - TypeScript configuration with type safety
app.json
The simplest configuration format using static JSON.Basic Example
app.json
When to Use app.json
Use app.json when:- Your configuration is entirely static
- You don’t need environment variables
- You want simple, straightforward configuration
- You’re new to Expo
app.config.js
JavaScript configuration enables dynamic values and environment variables.Basic Example
app.config.js
With Environment Variables
app.config.js
Dynamic Configuration
app.config.js
When to Use app.config.js
Use app.config.js when:- You need environment-specific configuration
- You want to compute dynamic values
- You need conditional configuration
- You want to reuse configuration values
app.config.ts
TypeScript configuration provides type checking and IntelliSense.Basic Example
app.config.ts
With Type Safety
app.config.ts
When to Use app.config.ts
Use app.config.ts when:- You want type safety
- You use TypeScript in your project
- You want IDE autocomplete
- You want to catch configuration errors early
Essential Configuration Fields
Required Fields
string
required
The name of your app as it appears on the home screen.
string
required
A URL-friendly name for your app. Used in Expo Go and URLs.
Common Fields
string
Your app’s version visible to users. Example:
"1.0.0"string
Lock screen orientation. Options:
"default", "portrait", "landscape"string
Path to app icon image. Should be 1024x1024 px.
string
Color scheme preference. Options:
"light", "dark", "automatic"string
Background color before app loads. Hex color code.
Splash Screen
string
Path to splash screen image.
string
How to resize splash image. Options:
"contain", "cover"string
Splash screen background color.
iOS Configuration
string
Unique identifier for iOS app. Example:
"com.mycompany.myapp"string
Build number for iOS. Increments with each build.
boolean
Whether the app supports iPad.
object
Additional entries for Info.plist.
Android Configuration
string
Unique identifier for Android app. Example:
"com.mycompany.myapp"number
Internal version number for Android. Increment with each release.
object
Adaptive icon configuration for Android 8.0+.
string[]
Android permissions to request. Example:
["CAMERA", "LOCATION"]Config Plugins
Config plugins modify native project configuration during prebuild.Using Plugins
app.json
Popular Plugins
- expo-camera - Camera permissions
- expo-location - Location services
- expo-notifications - Push notifications
- expo-splash-screen - Custom splash screens
- expo-font - Custom fonts
- expo-updates - OTA updates
Custom Plugins
Create your own config plugin:my-plugin.js
app.config.js
Extra Configuration
Store custom values accessible at runtime:app.config.js
Environment Variables
EXPO_PUBLIC Variables
Variables prefixed withEXPO_PUBLIC_ are embedded in your app:
app.config.js
Build-Time Variables
Other environment variables are available during configuration:app.config.js