Using Apple\'s Reachability code in iOS5 I get a bunch of compilation errors as shown below. Any ideas on what is happening here? I\'m using ARC so I have edited the standard co
Tony, is your class correctly work even with a non ARC project? I can see lot ok Reachability: dealloc in my consolle, and I don't know if it's normal or not! I use this method to check the connection (is the only place where I user Rechability)
-(BOOL)checkConnection{
BOOL connessione = FALSE;
Reachability *wifiResouce = [[Reachability reachabilityForLocalWiFi] retain];
Reachability *phoneResouce = [[Reachability reachabilityForInternetConnection] retain];
NetworkStatus netStatusWiFi = [wifiResouce currentReachabilityStatus];
NetworkStatus netStatusPhone = [phoneResouce currentReachabilityStatus];
if(netStatusWiFi == NotReachable){
if(netStatusPhone == ReachableViaWWAN){
connessione = TRUE;
}
}else if(netStatusWiFi == ReachableViaWiFi){
connessione = TRUE;
}
[phoneResouce release];
[wifiResouce release];
return connessione;
}
Apple's reachability has been updated to version 3 which now supports ARC iOS5+
Here is the link to the sample by Apple