connection lost when reaching availability status == 2

I am getting errors all day long that there is no network connection, while my availability data is 2.

This is a parsing error:

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


This is the code I am using to check for validation:

  Reachability *reach = [Reachability reachabilityForInternetConnection];

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


Obviously, the two outputs contradict each other.

Is there a way to tell what the network connection actually is, or in some other way around this error?


source to share

2 answers

I had the same error doing internet search and found that "the problem could be the new iphone 6 simulator" so I reset the iphone simulator and how it worked.

enter image description here

Hope it helps.



You can just quit the simulator (Alt-Shift Q) and restart it



All Articles