objective c - IOS Checking Active internet connection even connected via WIFI without internet -



objective c - IOS Checking Active internet connection even connected via WIFI without internet -

please help me out how check net connection in iphone.

i tried checking apple's reachability framework, not returning if connected via wifi without internet.

what getting reachable via wifi.

the other alternative tried making synchronous request google.com etc , checking response code.

is there other way check can avoid making url request , checking response code.

thanks in advance.

check if wifi reachable (using apple's reachability), , create request ensure host reachable.

// wifi checking code here //... [[[nsurlsession sharedsession] datataskwithurl:[nsurl urlwithstring:@"http://yourserver.com/somelightfile.html"] completionhandler:^(nsdata *data, nsurlresponse *response, nserror *error) { if (!error) { // host reachable } }] resume];

ios objective-c iphone ios7

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -