1

I have a React Native app set up in Expo.

I need to modify the info.plist, but am having problems doing so.

First, I can't find info.plist anywhere. Based on the Expo docs and this other SO question, the workaround is to add an "infoPlist" key into my app.json file. I have done so, and it looks like this:

"infoPlist": {
      "NSAppTransportSecurity": {
        "blah.s3.amazonaws.com": {
          "NSExceptionAllowsInsecureHTTPLoads": true,
          "NSRequiresCertificateTransparency": false,
          "NSIncludesSubdomains": true
        }
      }
    }

However when I attempt to compile the app (either by running "expo start" or "expo publish") I get the following error:

Error: Problem validating fields in app.json. See https://docs.expo.io/versions/v30.0.0/guides/configuration.html Should NOT have additional property 'infoPlist'.

Any ideas on how I can get around this?

Cog
  • 1,545
  • 2
  • 15
  • 27

1 Answers1

2

The infoPlist property needs to be added inside ios section (as it has no effect on Android).

Petr Peller
  • 8,581
  • 10
  • 49
  • 66
  • 2
    Agree; for reference, there's a sample Expo `app.json` in https://stackoverflow.com/questions/64731218/is-this-the-way-to-add-string-in-infoplist-file-with-expo-bare-workflow-in-sdk-3/64747403 – dchang Nov 09 '20 at 07:32