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

    由于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>

posted @ 2015-10-26 11:21  王刚韧(wanghy_iOS)  阅读(639)  评论(0编辑  收藏  举报