📜  expo app.json - Javascript (1)

📅  最后修改于: 2023-12-03 14:41:04.136000             🧑  作者: Mango

Expo app.json - Javascript

Expo app.json is a configuration file that is used to define various settings for your React Native application. This file is used by Expo CLI to configure various features of your application such as the app name, icon, splash screen, push notifications, and more.

Configuration Settings

Here are some of the key settings that can be configured in the Expo app.json file:

  • name: The name of your application.
  • icon: The icon used for your application.
  • splash: The splash screen used for your application.
  • version: The version number of your application.
  • orientation: The orientation of your application.
  • notification: The push notification settings for your application.
Example app.json File

Here is an example app.json file with some commonly used settings:

{
  "expo": {
    "name": "My Awesome App",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "version": "1.0.0",
    "orientation": "portrait",
    "notification": {
      "icon": "./assets/notification-icon.png",
      "color": "#ffffff",
      "androidMode": "default",
      "iosMode": "default",
      "androidCollapsedTitle": "New message from {{senderName}}"
    }
  }
}
Conclusion

The Expo app.json file is a powerful tool for configuring your React Native application. By using this file, you can quickly and easily define important settings such as your app name, icon, splash screen, and push notification settings. With a little bit of configuration, you can create an amazing React Native app that will delight your users.