Error Domain=NSURLErrorDomain Code=-1022;使用AFNetWorking连接报错
2016-03-13 17:14
816 查看
Error Domain=NSURLErrorDomain Code=-1022
"The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSUnderlyingError=0xxxxxxxxx {Error Domain=kCFErrorDomainCFNetwork Code=-1022 "(null)"}, NSErrorFailingURLStringKey=http://192.168.10.11:80822/service=token_request&validateStr=xxxx&uniqueKey=xxxx,
NSErrorFailingURLKey=http://192.168.10.11:8082/service=token_request&validateStr=xxxx&uniqueKey=xxxx, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.}
iOS开发中依然使用http请求,而非https请求,必须要专门设置一下plist:
添加App Transport Security Settings, 展开后输入Allow Arbitrary Loads,值改成YES
"The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSUnderlyingError=0xxxxxxxxx {Error Domain=kCFErrorDomainCFNetwork Code=-1022 "(null)"}, NSErrorFailingURLStringKey=http://192.168.10.11:80822/service=token_request&validateStr=xxxx&uniqueKey=xxxx,
NSErrorFailingURLKey=http://192.168.10.11:8082/service=token_request&validateStr=xxxx&uniqueKey=xxxx, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.}
iOS开发中依然使用http请求,而非https请求,必须要专门设置一下plist:
添加App Transport Security Settings, 展开后输入Allow Arbitrary Loads,值改成YES
相关文章推荐
- Submission Details
- STL map详细用法和make_pair函数
- Gym 100015 B Ball Painting
- grails中的缓存插件
- 3月13号周练——2015 Multi-University Training Contest 9
- 多线程中的锁系统(三)-WaitHandle、AutoResetEvent、ManualResetEvent
- 最常用的框架和main分析
- C. Mail Stamps---cf29c(离散化,图)
- [LeetCode] Palindrome Pairs 回文对
- CSU 1685-Entertainment Box(set+二分)
- 【CodeForces19E】Fairy
- opencv haartraining训练过程总结dir /b > info.txt
- Codeforces Round #345 (Div. 2) B. Beautiful Paintings
- TaintDroid下载与编译(六):(常出现的error)
- 关于main参数 *argv[] 指向空间放在哪的疑问
- 人工智能随想
- HDU1021Fibonacci Again
- 在RHEL7或者OL7上,Documents Fail to Index with DRG-11207: user filter command exited with status 127
- Ordered Fractions--最大公约数+pair
- 【leetcode】Array——Contains Duplicate II(219)