Transport Security has blocked a cleartext HTTP [How to Solve]

Problem Description:

** 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. **

Cause of the problem:

In IOS 9, apple changed the original HTTP protocol to the HTTPS protocol, using tls1.2 SSL to encrypt the request data

Problem solving:

In info.plist, open the nsallowsambitraryloads option

(1) Open info.plist and click open as > Source code, in the “& lt; dict>” Add the following code to:

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

(2)or open info.plist click Open As > Properity List

add Key: App Transport Security Settings

In the sub-section: Add Key: Allow Arbitrary Loads, select Value: YES

 

Similar Posts: