0
votes

I'm in the process of submitting my app to the App Store, but I read that I must notify the user if the internet connection is down when my app needs it. The Apple page mentioned Reachability as well. Currently, though, I'm using the UIWebView delegate method didFailLoadWithError...

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

    UIAlertView *errorAlert = [[UIAlertView alloc] initWithTitle:@"Error Loading" message:[error localizedDescription] delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
    [errorAlert show];

}

...and it's working fine. My question is, will my app be rejected for not using Reachability to do this, or is it fine doing what I am currently doing?

Thanks in advance.

1

1 Answers

3
votes

No, you're perfectly ok using didFailLoadWithError:.

Reachability class could be used to check if host is up (or internet connection at all) before even trying to load some page. But it is not neccessery, as long as you handle the possible errors - which obviously you do.

EDIT:

It is still a good practice to know wheather you will be able to reach a certain host or not. You could even modify GUI for each case (instead of just reporting an error). But this can always be done in update :)