Search code examples
iosobjective-cparse-platformreachability

Parse.com connection lost while reachability status == 2


I've been getting parse.com errors all day long that there is no network connection, while my reachability status logs 2.

This is the parse error:

_kCFStreamErrorDomainKey=1, 
_kCFStreamErrorCodeKey=57, 
NSLocalizedDescription=The network connection was lost.}, 
temporary=1, code=100}

This is the code that I use to test the ratability:

  Reachability *reach = [Reachability reachabilityForInternetConnection];

 NetworkStatus netStatus = [reach currentReachabilityStatus];
  if (netStatus == NotReachable) {
    NSLog(@"No internet connection!");
  } else {
    NSLog(@"netstatus: %ld",netStatus);
  }

It is obvious that the two outputs are contradicting.

Is there a way to tell parse that there actually is a network connection or any other way to circumvent this error?


Solution

  • I had same error searched from internet and found "problem might be new iphone simulator 6" that's why I reset the iphone simulator and than it worked..

    enter image description here

    Hope it helps..