How do i teel if someone has network coverage

Bakersville used Ask the Experts™
Hi all

I have a UIWebView within my app i am writing and i was wondering if there was a way of writing in a bit of code that would tell me (So i can do something else), if there is no network coverage for the iphone.

I have search the web, but the only thing i found was

-(void)webView (UIWebView *)webView didFailLoadWithError:(NSError *)error

But it seems to not work.

Many thanks

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
This is good enough.
Add this code inside:
UIAlertView *alert = [[UIAlertView alloc]  initWithTitle:@"Connection Error"
     message:@"Connection failure." delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[alert show];
[alert release];

Here is a sample from Apple:

Here is one more example (SBUsesNetwork):
How to Detect Network Availability in apps


Thank you for you help.

The zip files links don't work on

But if you are sure that the top will work, i will just use that.  

Thank you again for you help.



Very much appreciated.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial