Building with alternate app.json files

exp build:ios --release-channel staging --config /path/to/AppStaging/app.json

I am trying to build a separate version of my app that has a different icon and bundle ID using the --config argument on the build command. While it’s building on the server, it comes back with the following error:

05:46:35 [exp] Error: Missing app.json. See https://docs.expo.io/
05:46:35 [exp] Couldn't read app.json file in project at /Users/me/myproject/react-client

It doesn’t appear that the --config flag worked to copy my app.json file into the root of the project when it sent it up to the build server.

Any thoughts or ideas?

1 Like

Hey @bekki,

Given that it is the weekend and a holiday, I’m going to ask the devs who work closely on the exp CLI and release channels on Monday to see what they think may be occurring. I’ll circle back when I find something out!

Cheers,

Adam

Does your app.json file start with “expo”?
example :

{
  "expo": {
    "name": "xyz",
    "description": "xyz",
    "slug": "xyz",
    "sdkVersion": "27.0.0"
   .....
  }
}

Thanks for the response and sorry for the delay. My app.json file has the expo key in it, but does not start with it. Is it important that “expo” be the first key?

{
  "name": "MyApp",
  "displayName": "MyApp",
  "expo": {
    "name": "MyApp",
    "description": "No description",
    "slug": "MyApp",
    "privacy": "public",
    "sdkVersion": "25.0.0",
    "version": "1.0",
    "orientation": "portrait",
    "primaryColor": "#cccccc",
    "icon": "./App/Images/icon.png",
    "scheme": "myapp",
    "splash": {
      "image": "./App/Images/myapp_splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "packagerOpts": {
      "assetExts": [
        "ttf"
      ]
    },
    "ios": {
      "supportsTablet": false,
      "bundleIdentifier": "com.mycompany.myapp",
      "buildNumber": "1.0.22",
      "associatedDomains": [
        "applinks:myapp.herokuapp.com"
      ]
    },
    "android": {
      "package": "com.mycompany.myapp"
    }
  }

My goal was to be able to reference different bundle IDs and icon resources depending on the exp build:ios --config that I passed.

try to use expo key as first please. I use exp build:ios --config expo_staging.json --release-channel staging and it works.
BTW: “all you need to do is add an “expo” key at the root of app.json, as the parent of all other keys.” https://docs.expo.io/versions/latest/workflow/configuration

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.