Xcode 7 支持http请求info.plist设置
2015-12-02 21:04
573 查看
由于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。
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。
相关文章推荐
- HTTP请求协议 get post方法 获取数据解析
- 为什么指向的是最后一个节点的下一个节点 http://www.zhihu.com/question/20638791
- android网络文字数据的传输
- HTTP相关知识
- android网络编程(一)
- 看图学网络 二 网络边缘部分的应用体系结构
- HTTP状态码
- 网络协议学习笔记-数据链路层-MTU、路径MTU和串行线路吞吐量计算
- 暂停更新,请到http://www.52brt.com上关注最新文章
- 看图学网络 一 网络的组成
- TCP/IP详解学习笔记(2)-- 数据链路层
- socket与http的区别
- HTTP Modules versus ASP.NET MVC Action Filters
- iOS UIImageView 网络加载图片自适应大小问题
- HTTP Analyzer过滤器使用
- Android中开辟线程(下载-网络连接)
- [国嵌攻略][068][tftp网络协议实现]
- 【python】网络编程-TCP协议套接字
- 推荐一些C#相关的网站、资源和书籍 (转载自http://www.cnblogs.com/jiangxiaofan/p/3808316.html)
- 【python】网络编程-套接字常用函数