Transport security has blocked a cleartext HTTP

      No Comments on Transport security has blocked a cleartext HTTP

App Transport Security ATS encourages developers to use HTTPS over HTTP and thus any HTTP request is blocked. You can still workaround this security feature during development. But remember its strictly a workaround and should not be carried over to production as it will leave you app vulnerable

Workaround for DEVELOPMENT (DO NOT CARRY THIS IN PRODUCTION)

Set the NSAllowsArbitraryLoads key to YES under NSAppTransportSecurity

NSAllowsArbitraryLoads

App Transport Security

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

I repeat this is strictly a workaround while integrating third party dev APIs . Though there is a option to add exceptions on domains and sub domains but at times the create lot of issues in development.

A pat on the back !!

Leave a Reply

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