1

I used create-react-native-app for creating react native app.
My machine is Windows 10 and I use Expo to deploy app on iphone.

I can't use http or https with self signed certificate, so I would like to add ATS exception into info.plist.

Where should I put info.plist?
Should I use any default template for info.plist?

rnofenko
  • 9,198
  • 2
  • 46
  • 56
  • have you solved this issue? I have similar issue, can you write the guide. and where should i put the info.plist – Herman Nov 05 '18 at 02:13

1 Answers1

0

Okay so you are on Windows 10, which means you cannot use Xcode to edit the info.plist. But you could do this.Open info.plist In any XML Editor say VSCode.

Now before any tag within the plist file, you could add the TLS options as explained below. Be careful or you will break the XML document.

Also note NSAllowsArbitraryLoads is set to false, this means TLS restrictions apply for the app but not to the domains which you will explicitly whitelist.

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <false/>
        <key>NSExceptionDomains</key>
        <dict>
            <key>YOUR EXCEPTION DOMAIN</key>
            <string></string>
        </dict>
    </dict>

If you want to disable all TLS restrictions just set value of NSAllowsArbitraryLoads as true, like how it is given below. Your whitelist will be ignored if there is one.

<key>NSAllowsArbitraryLoads</key>
        <true/>