【发布时间】:2014-11-10 05:54:56
【问题描述】:
我有一个 iPhone 应用程序,其中我有一个请求,该请求在 wifi 和所有网络托架上都可以正常工作,但只有一个托架。在这辆马车上,如果我使用 ASIHttpRequest,它会给我以下错误:
ASIHTTPRequest request_didFail: Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred" UserInfo=0xd54e2f0 {NSUnderlyingError=0xd502de0 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.)", NSLocalizedDescription=A connection failure occurred}
如果我使用 AFNetworking,它会返回以下错误:
NSLocalizedDescription = "Could not connect to the server.";
NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1004 \"Could not connect to the server.\" UserInfo=0xdc98630 {NSErrorFailingURLKey=https://sitename.com, NSErrorFailingURLStringKey=https://sitename.com, NSLocalizedDescription=Could not connect to the server.}";
首先,假设此错误仅发生在特定运营商身上,可能是什么原因造成的?其次,由于该请求适用于除此车厢之外的所有内容,因此似乎很难调试,那么如何调试它以找到确切的问题?
谢谢
【问题讨论】:
标签: ios debugging networking afnetworking server