问题描述:
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
本文介绍了如何解决因App Transport Security (ATS) 导致的资源加载失败问题。苹果iOS9新增ATS特性,要求应用内所有网络请求必须通过HTTPS进行。若需加载HTTP资源,则需在Info.plist文件中配置NSAppTransportSecurity字典,并设置NSAllowsArbitraryLoads为YES。
524

被折叠的 条评论
为什么被折叠?



