IOS9之Xcode7允许Http
2015-09-18 14:11
513 查看
转自 http://www.imomi.info/article/Transport%20Security%20has%20Blocked%20a%20cleartext%20HTTP
箱子参考 https://github.com/ChenYilong/iOS9AdaptationTips
HTTP 的。
运行 http 连接程序会提示
本来这是好事儿,但是鉴于特殊国情,还是得支持HTTP啊。
按照提示其实只要在 Info.plist 添加
即可,还可以指定域名。
箱子参考 https://github.com/ChenYilong/iOS9AdaptationTips
HTTP 的。
运行 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.
本来这是好事儿,但是鉴于特殊国情,还是得支持HTTP啊。
按照提示其实只要在 Info.plist 添加
<key>NSAppTransportSecurity</key> <dict> <!--Include to allow all connections (DANGER)--> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
即可,还可以指定域名。
<key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>yourserver.com</key> <dict> <!--Include to allow subdomains--> <key>NSIncludesSubdomains</key> <true/> <!--Include to allow HTTP requests--> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> <!--Include to specify minimum TLS version--> <key>NSTemporaryExceptionMinimumTLSVersion</key> <string>TLSv1.1</string> </dict> </dict> </dict>
相关文章推荐
- Xcode7.0网络问题,无法获得接口数据是HTTP的问题
- java相关网络协议无响应的原因之一
- 深度链接(Deep-linking)是移动和网络之间缺失的链接
- http请求中session的创建时期
- HttpUrlConnection Post提交数据到服务器、并得到服务器返回的数据
- 飞鸽传书源码分析三-网络
- HttpClient使用post方式模拟表单提交数据到服务器并下载服务器文件
- xcode version7.0 禁用https
- Tcp协议理解
- Xcode7 网络请求报错:The resource could not be loaded because the App Transport Security policy requir
- xcode7.0-iOS9新特性之二:网络适配
- RedHat Linux网络配置过程笔记
- 计算机网络之局域网&以太网
- 计算机网络之局域网&以太网
- 【 Android官方文件读书笔记】连接网络
- ios网络判断的方式
- 计算机网络之数据链路层
- 计算机网络之数据链路层
- 计算机网络之概念解析
- 计算机网络之概念解析