React Native course Β· Module 12: Publishing the app
app.json / app.config.js - App configuration
In this lesson2
Congratulations! You've reached the final module! It's time to rise to the surface and publish your app!
app.json - basic configuration
{
"expo": {
"name": "Atlantis",
"slug": "atlantis-app",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#0a2e4a"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.atlantis.app",
"buildNumber": "1"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#0a2e4a"
},
"package": "com.atlantis.app",
"versionCode": 1
},
"plugins": [
"expo-router",
["expo-camera", { "cameraPermission": "Allow access to camera" }]
],
"extra": {
"eas": { "projectId": "xxx-xxx-xxx" }
}
}
}app.config.js - dynamic configuration
// app.config.js
export default ({ config }) => ({
...config,
name: process.env.APP_ENV === 'production' ? 'Atlantis' : 'Atlantis (Dev)',
slug: 'atlantis-app',
version: '1.0.0',
extra: {
apiUrl: process.env.API_URL || 'https://api.atlantis.app',
eas: {
projectId: process.env.EAS_PROJECT_ID,
},
},
});Code for this lesson: app.json
// File: app.json - Expo app configuration
{
"expo": {
// TODO: set "name" to "Atlantis" (name shown under the icon)
"name": "",
// TODO: set "slug" to "atlantis-app" (project identifier in Expo)
"slug": "",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"ios": {
"supportsTablet": true,
// TODO: add "bundleIdentifier" in the form "com.atlantis.app"
"buildNumber": "1"
},
"android": {
// TODO: add "package" in the form "com.atlantis.app"
"versionCode": 1
}
// TODO: add a "plugins" section with an array, e.g. ["expo-router"]
}
}Spotted a mistake in this lesson?
Check yourself
Answer the questions from this lesson. Pick an answer to see right away whether it is correct.
1. Where is the app name defined in app.json?
2. Where is the bundleIdentifier defined for iOS?
These are 2 of 5 questions for this lesson. Solve the rest in the game.
Hands-on tasks in the game
- Code editor
Complete app.json with basic settings.