Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7013119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:20:42+00:00 2026-05-27T22:20:42+00:00

My iPhone app requires internet to function. Should I checks for connectivity everytime a

  • 0

My iPhone app requires internet to function.

Should I checks for connectivity everytime a internet function is executed?
Or should I use my appDelegate to listen for messages from something like the reachability class to determine if the connection was lost and warn the user?

What is better?

Here’s what I’ve done so far in my app delegate:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {


    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityChanged:) name:kReachabilityChangedNotification object:nil];  

    reachability = [[Reachability reachabilityWithHostName:[NSString stringWithFormat:@"http://%@/iSql/" ,[[NSUserDefaults standardUserDefaults] stringForKey:@"serviceIPAddress"]]] retain];

    [reachability startNotifier];

    return YES;
}

- (void)reachabilityChanged:(NSNotification *)note {

    NetworkStatus ns = [(Reachability *)[note object] currentReachabilityStatus];

    if (ns == NotReachable) {

        if (![networkAlert isVisible]) {

            if ([self networkAlert] == nil) {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"\n\nNo Internet Connection" message:@"You require an internet connection to retrieve data from the server." delegate:nil cancelButtonTitle:nil otherButtonTitles:nil];
                [self setNetworkAlert:alert];
                [alert release];
            }

            [networkAlert show];  
        }
    } else {

        if ([self networkAlert] != nil) {
            [networkAlert dismissWithClickedButtonIndex:0 animated:YES]; 
        }

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:20:43+00:00Added an answer on May 27, 2026 at 10:20 pm

    At least one Apple tech talk presenter recommended not checking Reachability in most cases, just firing off your async network requests, informing the user (via some type of activity indicator) that the app is waiting for a network response, and giving the user an option if in their opinion they’ve waited long enough, instead of locking up the UI or the app.

    The reason is that, on a moving mobile device, the network can and will often go up between the Reachability tests and any actual data requests. Thus the user will be misinformed. The net can also go down after informing the user that there is connectivity, which can even be worse.

    Plus Reachability only tells you about the connectivity of the nearest/1st network hop, which may or may not provide connectivity to the rest of the internet or to your destination site. Common example might be all those misconfigured WIFI access points.

    Locking up the UI, and not giving the user any option after waiting long enough is likely grounds for rejection, whether or not you’ve checked Reachability first.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple iPhone app that requires a random integer from 1-100.
I am making an iphone app which requires me to make use of website
The iPhone app that I am working on requires GET calls to a 3rd
I'm developing an iPhone app that requires MFMessageComposeViewController to send texts as actual texts
An Android/Iphone app will be accessing application data from the server. [Django-Python] How can
I'd like to allow users to send out Tweets from my iPhone app. That's
I'm currently working on an iPhone app that requires the user to accept a
Let's say I need to access a web service from an iPhone app. This
I am writing an iPhone app that has a number of UITextFields that requires
My app requires an image uploader which either takes an image from the user's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.