适配iOS9https请求

来源:互联网 发布:mac上怎么用office 编辑:程序博客网 时间:2024/05/17 04:24

这里就不说https和http的具体区别了网上一大推
如果不配置的话就有这个错误。网络请求失败。

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.

直入主题:
这里写图片描述
如上图:
1在主plist文件下的Information Property List下添加
NSAppTransportSecurity类型为Dictionary
在该目录下在加
NSAllowsArbitraryLoads类型为Boolen Value值为YES

接下来在TARGETS里点击Build Setting搜索bitcode
将Enable Bitcode设为No
这里写图片描述
希望可以帮到你
同时也欢迎访问http://www.jianshu.com/users/be0e45643dcf/latest_articles
https://github.com/tubie

0 0
原创粉丝点击