1 网络请求问题
今天运行了下以前的项目发现项目要提示:
The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
想到之前听说IOS9 应用改为HTTPS 请求,以前项目都是HTTP请求。不过之前的项目已经不维护了,所以搜了一圈找到如下方法:
- 在Info.plist中添加
NSAppTransportSecurity
类型Dictionary
。 - 在
NSAppTransportSecurity
下添加NSAllowsArbitraryLoads
类型Boolean
,值设为YES
试了一下 解决问题。