首页 > 代码库 > iOS 8 & Xcode 6:解决The network connection was lost.

iOS 8 & Xcode 6:解决The network connection was lost.

最近,和几位大大一起,仿写一个客户端。代码没作变动,一直工作正常。刚才从休眠中继续调试,输出如下错误:

2014-11-21 21:37:02.430 zhihudaily[2140:212751] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo=0x7fe86a65d8e0 {NSUnderlyingError=0x7fe86a522690 "The network connection was lost.", NSErrorFailingURLStringKey=http://news-at.zhihu.com/api/3/stories/latest?client=0, NSErrorFailingURLKey=http://news-at.zhihu.com/api/3/stories/latest?client=0, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=57, NSLocalizedDescription=The network connection was lost.}

重启模拟器,程序可正常运行。

 

iOS 8 & Xcode 6:解决The network connection was lost.