Comments (4)
这里是配置问题,由于之前测试代码中需要访问http接口,故在info.plist中添加了该字段,后来没有给予删除,您可以尝试删除后测试。关于之前您提交的报错是因为证书文件的问题,这种方法是经过了测试的,并且已经提交到App Store中审核并运行,谢谢提交issue,我会抽空检查一下我的代码,如有问题,将及时改正。
from ymhttpstest.
您好,我重新核对了一下代码并测试了项目,当前项目实现https确实需要在Allow Arbitrary Loads的条件下生效,这也是之前没有发现的。如果将其值设为NO或删除字段会报错说我的证书SLL验证有问题,无法与服务器进行安全连接。如果您的证书是SSL证书建议使用README.md中的系统方法实现,如果您的证书是自签名证书,可能无法通过苹果认证的安全验证,Allow Arbitrary Loads值必须设为 YES,因为这确实是Apple不认可的解决方案,是非常规的(Apple的文档中明确列出了SSL证书的颁发机构清单,表明了立场,如果证书的颁发机构不在其内,理论上来说都是不受其认可的)。至于Apple到明年支不支持Allow Arbitrary Loads还不得而知,个人觉得应该会允许,不然国内大部分公司将会非常头疼,因为SSL证书真的很贵。如果您找到更好的方法,请告知。本人仍将不断改进代码,如有新的解决方案也将第一时间提交更新。最后非常感谢!
from ymhttpstest.
你好,服务器后端已经用startssl申请了免费ssl证书,这个也属于已经ca机构,是否能通过苹果审核,并且这个认证的证书,是不是在afnetworking中的网络请求不需要导入证书进一步网络请求认证?Allow Arbitrary Loads设置为no依然有数据返回
from ymhttpstest.
用AFNetworking应该是需要导入证书在bundle内的,目前的情况是用http访问没问题,用https访问就没有数据是吗?建议用系统的方法进行网络请求,我所知道的AFNetworking对https支持不是很好。
from ymhttpstest.
Related Issues (3)
- 运行报错 HOT 1
- SSL证书和自签名证书 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ymhttpstest.