iOS9默认加载Https协议的相关设置

在info.plist文件中加入相应的字段

有两种方法:

方法一:

在info.plist文件中添加  NSAppTransportSecurity 设置为dictionary

在NSAppTransportSecurity中添加 NSAllowsArbitraryLoads 设置为Boolean型,设置为YES;

效果如图:

 

 

方法二:

info.plist—右键—>Open as—>Source Code  在最后的</dict></plist>之前添加

<key>NSAppTransportSecurity</key>

<dict>

<key>NSAllowsArbitraryLoads</key>

<true/>

     </dict>

 

效果如图:

 

 

 

以上两种方法完成其中任一种即可顺利请求数据

posted @ 2015-11-06 10:41  Mr_tao  阅读(228)  评论(0编辑  收藏  举报