最近将xcode升级到xcode7以后,关于网络请求总会提示失败,查阅各方资料,找到解决途径:
- 在Info.plist中添加
NSAppTransportSecurity
类型Dictionary
。 - 在
NSAppTransportSecurity
下添加NSAllowsArbitraryLoads
类型Boolean
,值设为YES
NSAppTransportSecurity
类型 Dictionary
。NSAppTransportSecurity
下添加 NSAllowsArbitraryLoads
类型Boolean
,值设为 YES