Override Application Transport Security in xCode

When you get the 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., you can override the security and allow all http urls through by adding this to your info.plist file:

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

However, before doing this, check to see if there is an https version of the url. That will work just as well, and https won’t throw that error.

Leave a Reply

Your email address will not be published. Required fields are marked *