iOS9 HTTP

What

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 Transport Security (ATS)

新特性要求App内访问的网络必须使用HTTPS协议。

How

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