Ios9下访问http:// 安全认证
2016-02-03 17:47
351 查看
<code class="hljs livecodeserver has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal;"></code>
如果你出现
<code class="hljs livecodeserver has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;">App Transport Security has blocked <span class="hljs-operator" style="box-sizing: border-box;">a</span> cleartext HTTP (<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">http</span>://) resource <span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">load</span> since <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">it</span> is insecure. Temporary exceptions can be configured via your app<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'s Info.plist file.</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>
就需要修改info.plist
文本编辑,或xcode open as source code
在节点内加入
<code class="hljs xml has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;"><span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">key</span>></span>NSAppTransportSecurity<span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"></<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">key</span>></span> <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">dict</span>></span> <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">key</span>></span>NSAllowsArbitraryLoads<span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"></<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">key</span>></span> <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">true</span>/></span> <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"></<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">dict</span>></span></code>
相关文章推荐
- Linux TCP队列相关参数的总结
- Python 14.2 TCP编程
- HttpClient设置代理,超时,以及得到cookies
- mysql-5.7.9-winx64 MySQL服务无法启动,服务没有报告任何错误的解决办法 转自【IT精英团】:http://www.itnpc.com/news/web/144832818227054.html
- 网络解析过程
- qemu网络配置
- http缓存策略
- Http的四种post方式
- nginx折腾记(HTTP性能能测试,与Apache对比)
- Java之Socket与HTTP区别
- 电信/网络术语集合(补充中)
- HttpClient 教程 (六)
- 解决server 2012下 wamp 启动80端口被占用问题
- Imageview 加载网络图片 图片动态处理 图片不变形的方法
- JAVA 获取网络时间
- HttpClient 教程 (三)
- 评估AWS EC2作为web server时的网络负载
- 一个网络连接中的小控件
- 开源网络爬虫WebCollector的demo
- HttpClient 教程 (二)