4

I just installed react-native-image-crop. When I tried to make a photo on an actual iPhone, I received a quite strange error. 'App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.'. Is this because I using the metro builder? or something else maybe?

My Info.plist:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>localhost</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
</dict>
Istvan Orban
  • 1,607
  • 3
  • 18
  • 34
  • 1
    Possible duplicate of [Transport security has blocked a cleartext HTTP](https://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http) – mag_zbc Jul 16 '18 at 13:49

1 Answers1

10

You need to add this key in Info.plist enter image description here

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>
Chirag Shah
  • 3,034
  • 1
  • 30
  • 61