iphone - Reachability Guide for iOS 4 -



iphone - Reachability Guide for iOS 4 -

has found halfway decent guide implementing reachability on ios4? have yet find one.

thanks in advance!

i have implemented reachability this. download https://developer.apple.com/iphone/library/samplecode/reachability/index.html , add together reachability.h , .m project. add together systemconfiguration framework project. #import "reachability.h" want utilize it. utilize code.

-(bool)reachable { reachability *r = [reachability reachabilitywithhostname:@"enbr.co.cc"]; networkstatus internetstatus = [r currentreachabilitystatus]; if(internetstatus == notreachable) { homecoming no; } homecoming yes; }

when want check reachability...

if ([self reachable]) { nslog(@"reachable"); } else { nslog(@"not reachable"); }

here illustration project made. http://dl.dropbox.com/u/3656129/reachabilityexample.zip

iphone reachability

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -