ios9以後的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.
由于ios9中,蘋果将原<code>http協定</code>改成了<code>https協定</code>,使用<code>tls1.2 ssl</code>加密請求資料。
在<code>info.plist</code>檔案加入key
效果下圖:
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLicGcq5CbzEHNzADNtBjMqlHb3RzMtZWN3VWM3dWOwUTY4YWM48CXwkjN312Lc52YucWbpFmbpNnLzc3dvw1LcpDc0RHaiojIsJye.jpg)
參考資料
再一次感謝您花費時間閱讀這篇文章!
微網誌: @danny_呂昌輝
部落格: superdanny