iOS9中請求出現App Transport Security has blocked a cleartext HTTP (http://)

錯誤描述:

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

 

在iOS9中,蘋果將原http協議改爲了https協議,使用 TLS1.2 SSL加密請求數據。加密

解決方法:

在info.plist 加入keyblog

<key>NSAppTransportSecurity</key>it

<dict>io

<key>NSAllowsArbitraryLoads</key>file

<true/>exception

</dict>請求

或按下圖所示添加內容方法

相關文章
相關標籤/搜索