A security policy configured with `AFSSLPinningModeCertificate` can only be applied on a manager wit
2017-09-15 15:55
447 查看
A security policy configured with `AFSSLPinningModeCertificate` can only be applied on a manager with a secure base URL (i.e. https)
本来就是写个demo,然后去git上下载了一份最新的AFNetworking,运动就崩了,打印这个错误,一头雾水,其他项目这样写没有问题的。
其实这个错误已经告诉我们是证书安全的问题,我们在封装网络请求的时候
AFHTTPSessionManager * manager = [AFHTTPSessionManager manager];只写了这部分,现在要求这样写:
AFHTTPSessionManager * manager = [[AFHTTPSessionManager manager]initWithBaseURL:[NSURL
URLWithString:url]];URL就是你们服务器的URL前缀
注明:[AFHTTPSessionManager manager]这个需要写个单例,不然就会内存泄漏哦!
本来就是写个demo,然后去git上下载了一份最新的AFNetworking,运动就崩了,打印这个错误,一头雾水,其他项目这样写没有问题的。
其实这个错误已经告诉我们是证书安全的问题,我们在封装网络请求的时候
AFHTTPSessionManager * manager = [AFHTTPSessionManager manager];只写了这部分,现在要求这样写:
AFHTTPSessionManager * manager = [[AFHTTPSessionManager manager]initWithBaseURL:[NSURL
URLWithString:url]];URL就是你们服务器的URL前缀
注明:[AFHTTPSessionManager manager]这个需要写个单例,不然就会内存泄漏哦!
相关文章推荐
- there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- convert doc with images in to wiki format can only be on linux
- there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- [Err] 1293 - there can be only one TIMESTAMP column with CURRENT_TIME in DEFAULT or ON UPDATE clause
- there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- msyql同步的时候报错 : 错误代码: 1293 Incorrect table definition;there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- 数据库建表 there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- ERROR 1839 (HY000): @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON
- java.lang.IllegalArgumentException: FormUrlEncoded can only be specified on HTTP methods with requ
- A const field of a reference type other than string can only be initialized with null Error [duplicate]
- 重装Eclipse提交时遇到CHECKOUT can only be performed on a version resource的问题
- Only one instance of a ScriptManager can be added to the page.
- android.view.InflateException: <merge /> can be used only with a valid ViewGroup root and attachToRo
- Cannot connect to WMI provider.You do not have permission or the server is unreachable.Note that you can only manager SQL Server 2005 and later version with SQL Server Configuration Manager.Invalid namespace [0x8004100e]
- Unity中BUG:SetDestination can only be called on an active agent that has been placed on a navmesh 的处理
- BUG "SetDestination" can only be called on an active agent that has been place
- Sqlachemy的警告SAWarning: The IN-predicate on "sns_object.BIZ_ID" was invoked with an empty sequence. This results in a contradiction, which nonetheless can be expensive to evaluate.
- 导航报错SetDestination() can only be called on an active agent that has been placed on a NavMesh
- QT “Timers can only be used with threads started with QThread”的解决办法~