App transport Security load Error even after adding it

4.6k Views Asked by At
  1. Even after adding App Transport Security Settings and Allow Arbitrary Loads under it I'm still getting the same 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."

  1. also couldn't figure out why the value of 'App Transport Security Settings' on the right side of the table is showing 0

enter image description here

2

There are 2 best solutions below

1
kubrick G On BEST ANSWER

You should add Allow Arbitrary Loads inside App Transport Security Settings dictionary, like this:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

enter image description here

1
Run 4ever On

Just adding to the above (yes it does still work at time of writing). For development purposes this works, but you won't be able to publish beyond 100 users in your Test Flight.

If you intend to push the app to the public or a Beta group you'll need to move to HTTPS or have very good reasons for the HTTP. See more here: https://developer.apple.com/documentation/security/preventing_insecure_network_connections