首页 > Web开发 > 详细

Xcode 7 支持http请求info.plist设置

时间:2015-10-26 12:12:37      阅读:277      评论:0      收藏:0      [点我收藏+]

    由于iOS9改用更安全的https,为了能够在iOS9中正常使用http发送网络请求,请在"Info.plist"中进行如下配置,否则影响SDK的使用。

1.找到项目中的 Info.plist 文件,右击,选择 open as ------>source code.

2.在打开的文件中光标定位倒数第二行。将下放的内容复制进去。

<key>NSAppTransportSecurity</key>

    <dict>

        <key>NSAllowsArbitraryLoads</key>

        <true/>

    </dict>

 

 

或者:

<key>UISupportedInterfaceOrientations~ipad</key>

<array>

<string>UIInterfaceOrientationPortrait</string>

<string>UIInterfaceOrientationPortraitUpsideDown</string>

<string>UIInterfaceOrientationLandscapeLeft</string>

<string>UIInterfaceOrientationLandscapeRight</string>

</array>

    <key>NSAppTransportSecurity</key>

    <dict>

        <key>NSAllowsArbitraryLoads</key>

        <true/>

    </dict>

3.command +S 保存。

4.OK。

 

 

 

 

<key>NSAppTransportSecurity</key>

    <dict>

        <key>NSAllowsArbitraryLoads</key>

        <true/>

    </dict>

Xcode 7 支持http请求info.plist设置

原文:http://www.cnblogs.com/wahy/p/4910669.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!