React Native: Example of full expo app.json

When I first started spending time with React Native, it was often a battle to work out just where and how things were supposed to be formatted in the app.json.

The base file doesn’t include the splash screen, app icon, notification icons, google signin nodes, and nodes required to build for the Play Store and the App Store.

Note the two bundle identifiers should always match (across android and ios). You should increment the 3 version identifiers in a uniform way unless you’re working on separate dedicated teams.

Here’s a lightly modified version of an app.json from a production app we’re working on. I’ll keep adding pieces to this script so it can become a kitchen sink file.

{
  "expo": {
    "sdkVersion": "26.0.0",
    "scheme": "foodorderingapprn",
    "name": "Food Ordering App",
    "version": "0.0.1",
    "orientation": "portrait",
    "slug": "food-ordering-app-rn",
    "icon": "./assets/logo-1024.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#deff00"
    },
    "notification": {
      "icon": "./assets/notification-48.png",
      "color": "#deff00"
    },
    "android": {
      "config": {
        "googleSignIn": {
          "apiKey": "AIzaSyDCXXXXXXXPBTDw9-22222vvYQJiE11111",
          "certificateHash": "FFFFFFFFFFFFAA8BA9C47FF23A4E8FBAC5962675"
        },
        "branch": {
          "apiKey": "key_live_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
        }
      },
      "package": "au.com.codeworkshop.food",
      "versionCode": 1,
      "permissions": []
    },
    "ios": {
      "config": {
        "branch": {
          "apiKey": "key_live_hdFKWmm3Yuv7LVjtujrx8knarvj1Yyla"
        }
      },
      "bundleIdentifier": "au.com.codeworkshop.food",
      "buildNumber": "1.0.1"
    },
    "extra": {
      "app_code": "ABCD"
    }
  }
}
Published