Swift Http请求问题 ios9.0

问题:App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

原因:

从iOS9起,新特性要求App访问网络请求,要采用 HTTPS 协议。

解决办法:

1,在Info.plist中添加 App Transport Security Settings 类型 Dictionary ;

2,在 App Transport Security Settings 下添加 Allow Arbitrary Loads 类型Boolean ,值设为 YES; 


你可能感兴趣的:(Swift Http请求问题 ios9.0)