Xcode7(iOS9 beta1)网络请求失败,配置info.plist文件解决--iOS开发
来源:互联网 发布:数据库市场占有率 2016 编辑:程序博客网 时间:2024/05/17 06:25
Application 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.
上面的错误提示已经说明了了让你去配置info.plist文件,那就去配置呗,咋整
归根结底还是是苹果吧人家http协议改成了https协议,在iOS9 beta1的时候就改了,使用 TLS1.2 SSL加密请求数据。不知道人家怎么想的,可能认为不安全吧,所以这样做了,英文再怎么不好也能从上面的英文句子可以看到一点的。
就这样:添加一个字典,字典里添加一个BOOl值元素,详情如下:
NSAppTransportSecurity 后面的类型选择(一般默认的就是字典)->Dictionary
子元素NSAllowsArbitraryLoadsBoolean值默认为NO,自己改成YES就好了
好了!
重新运行Application就可以了。
另外,这事苹果官网的说法,谁要有空可以顺便翻一下
App Transport Security
App Transport Security (ATS) enforces best practices in the secure connections between an app and its back end. ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt; it is also on by default in iOS 9 and OS X v10.11. You should adopt ATS as soon as possible, regardless of whether you’re creating a new app or updating an existing one.
If you’re developing a new app, you should use HTTPS exclusively. If you have an existing app, you should use HTTPS as much as you can right now, and create a plan for migrating the rest of your app as soon as possible. In addition, your communication through higher-level APIs needs to be encrypted using TLS version 1.2 with forward secrecy. If you try to make a connection that doesn't follow this requirement, an error is thrown. If your app needs to make a request to an insecure domain, you have to specify this domain in your app's Info.plist
file.
- Xcode7(iOS9 beta1)网络请求失败,配置info.plist文件解决--iOS开发
- iOS开发 iOS9适配(info.plist文件)
- iOS9网络适配 info.plist配置
- iOS的网络配置info.plist
- [iOS开发]日常需求一:Xcode7、iOS9设置Http网络请求(不能使用Http的解决办法)
- iOS开发常见文件--Info.plist
- 解决IOS9的Info.plist问题
- iOS Info.plist文件
- iOS info.plist文件
- iOS9网络请求失败
- React-Native 在iOS9之后,网络请求默认为Https请求,如需支持Http,修改info.plist文件添加键值对设置允许http访问。
- ios9 数据请求需要在info.plist文件中添加一个字符串
- ios info plist配置说明
- iOS info plist配置说明
- iOS中Info.plist文件的常见配置
- iOS中Info.plist文件的常见配置
- iOS新项目的环境配置info.plist文件
- iOS中info.plist文件的一些相关配置
- prj文件所在目录
- 二叉树中和为某一值的路径
- 第一遍 第一章
- ext2文件系统源代码之xattr_trusted.c
- mysql导出视图以及表结构
- Xcode7(iOS9 beta1)网络请求失败,配置info.plist文件解决--iOS开发
- 继承与派生
- 利用bind启动service
- ext2文件系统源代码之xattr_user.c
- 把本地的int类型的图片转换成drawable、Bitmap
- 第一遍 第二章算法
- 在Editplus配置PHP
- Bzoj3791:作业:DP
- ext2文件系统源代码之xattr_security.c