ios8 - Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." -
i have application works fine on xcode6-beta1 , xcode6-beta2 both ios7 , ios8. xcode6-beta3, beta4, beta5 i'm facing network issues ios8 works fine on ios7. error "the network connection lost.". error follows:
error: error domain=nsurlerrordomain code=-1005 "the network connection lost." userinfo=0x7ba8e5b0 {nserrorfailingurlstringkey=, _kcfstreamerrorcodekey=57, nserrorfailingurlkey=, nslocalizeddescription=the network connection lost., _kcfstreamerrordomainkey=1, nsunderlyingerror=0x7a6957e0 "the network connection lost."}
i use afnetworking 2.x , following code snippet make network call:
afhttprequestoperationmanager *manager = [afhttprequestoperationmanager manager]; [manager setsecuritypolicy:policy]; manager.requestserializer = [afhttprequestserializer serializer]; manager.responseserializer = [afhttpresponseserializer serializer]; [manager post:<example-url> parameters:<parameteres> success:^(afhttprequestoperation *operation, id responseobject) { nslog(@“success: %@", responseobject); } failure:^(afhttprequestoperation *operation, nserror *error) { nslog(@"error: %@", error); }]; i tried nsurlsession still receive same error.
restarting simulator fixed issue me.
Comments
Post a Comment