App configuration
Learn how to configure your ExpoLaunch app for development and production environments.
When configuring your app, you'll need to define settings in different places.
App configuration
Let's start with the core settings for your app. These settings are crucial as they're used by Expo and EAS to build your app, determine its store presence, prepare updates, and more.
This configuration includes essential details like the official name, description, scheme, store IDs, splash screen configuration, and more.
You'll define these settings in app.config.js
. Make sure to follow the (Expo
config)[https://docs.expo.dev/versions/latest/config/app/] schema when setting this up.
Here is an example of what the config file looks like:
import 'dotenv/config'
import fs from 'fs'
const isFirebaseConfigured =
fs.existsSync('./GoogleService-Info.plist') && fs.existsSync('./google-services.json')
const iosUrlScheme = process.env.EXPO_PUBLIC_GOOGLE_IOS_URL_SCHEME
export default {
expo: {
name: 'ExpoLaunch',
slug: 'expo-launch',
description: 'Expo start kit',
version: '1.0.0',
owner: 'jonypopov',
orientation: 'portrait',
icon: './assets/images/icon.png',
scheme: 'expolaunch',
userInterfaceStyle: 'automatic',
newArchEnabled: false,
platforms: ['ios', 'android'],
androidNavigationBar: {
backgroundColor: '#000000',
},
ios: {
supportsTablet: true,
bundleIdentifier: 'expo.launch',
usesAppleSignIn: true,
appleTeamId: 'YOUR_APPLE_TEAM_ID',
config: {
usesNonExemptEncryption: false,
},
...(isFirebaseConfigured && {
googleServicesFile: './GoogleService-Info.plist',
}),
},
android: {
adaptiveIcon: {
foregroundImage: './assets/images/adaptive-icon.png',
backgroundColor: '#D29647',
},
package: 'expo.launch',
permissions: [
'android.permission.RECORD_AUDIO',
'android.permission.USE_BIOMETRIC',
'android.permission.USE_FINGERPRINT',
'com.android.vending.BILLING',
],
...(isFirebaseConfigured && {
googleServicesFile: './google-services.json',
}),
},
****
extra: {
eas: {
projectId: 'YOUR_PROJECT_ID',
},
router: {
origin: false,
},
},
----
Make sure to replace the values with your own and take your time to set everything correctly.
EAS configuration
To properly build and publish your app, you need to define settings for the EAS build service.
This is done in eas.json
and it must follow the
EAS config scheme.
Here is an example of what the config file looks like:
{
---
"submit": {
"production": {
"ios": {
"ascAppId": "YOUR_ASC_APP_ID"
}
}
}
}
Make sure to fill all the environment variables with the correct values for your project and correct environment, otherwise your app won't build and you won't be able to publish it.
Environment variables
Environment variables are defined in the .env file in the root of the repository and in the root of the apps/mobile package.
EXPO_PUBLIC_SUPABASE_PROJECT_URL=
EXPO_PUBLIC_SUPABASE_ANON_KEY=
EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID=
EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID=
EXPO_PUBLIC_GOOGLE_IOS_URL_SCHEME=
EXPO_PUBLIC_REVENUECAT_API_KEY_IOS=
EXPO_PUBLIC_REVENUECAT_API_KEY_ANDROID=
EXPO_PUBLIC_SENTRY_DSN=
EXPO_PUBLIC_ prefix
To make environment variables available in the Expo app code, you need to prefix them with EXPO_PUBLIC_. They will be injected to the code during the build process.
Only environment variables prefixed with EXPOPUBLIC will be injected.
Read more about Expo environment variables.