更新了下Xcode,运行之前的项目发现提示网络不可用,在模拟器里用浏览器访问相应地址,是可以打开的;
Xcode7 (IOS9) 报错:The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
记得听到过IOS9要求App内访问的网络必须使用HTTPS协议,百度到以下解决方法:
- 在Info.plist中添加
NSAppTransportSecurity类型Dictionary。 - 在
NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES
添加后问题解决
