iOS http请求不能用的解决办法
解决方法:
在Info.plist中添加
NSAppTransportSecurity
类型Dictionary
。在
NSAppTransportSecurity
下添加NSAllowsArbitraryLoads
类型Boolean
,值设为YES
在项目配置文件info.plist中添加App Transport Security Settings字典dictionary。在其下添加属性名为Allow Arbitrary Loads的bool值为yes。
即可解决。
君凯商联网-iOS-字唐名僧