问题描述:

The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

问题分析:

苹果iOS9引入新特性 App Transport Security (ATS) 。新特性要求App内访问的网络必须使用 HTTPS 协议。

解决方案:

  • Info.plist 中添加 NSAppTransportSecurity 类型 Dictionary
  • NSAppTransportSecurity 下添加 NSAllowsArbitraryLoads 类型 Boolean ,值设为 YES