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 8579615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:38:46+00:00 2026-06-11T20:38:46+00:00

I use reacheability class for checking my network connectivity in my app… Reachability *reach

  • 0

I use reacheability class for checking my network connectivity in my app…

Reachability *reach = [Reachability reachabilityForInternetConnection]; 
    NetworkStatus netStatus = [reach currentReachabilityStatus];    
    if (netStatus==NotReachable)
    {
        NSLog(@"NR");
    }

I need to find when the network status change (i.e when the network status changes from reachable to notreachable and vice versa).

Is there any delegates to find this thinks, Any suggestions ?

  • 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-06-11T20:38:47+00:00Added an answer on June 11, 2026 at 8:38 pm

    Used this flag kReachabilityChangedNotification to find the change in network status and passed that to a NSNotificationCenter

    Here is the code:

    NSString *host = @"https://www.apple.com"; // Put your host here
    
            // Set up host reach property
           hostReach = [Reachability reachabilityWithHostname:host];
    
                              // Enable the status notifications
                              [[NSNotificationCenter defaultCenter] addObserver:self  selector:@selector(reachabilityChanged:) name:kReachabilityChangedNotification object:nil];
                               [hostReach startNotifier];
    
       - (void) reachabilityChanged: (NSNotification* )note
    {
        Reachability *reachability = [note object];
        NSParameterAssert([reachability isKindOfClass:[Reachability class]]);
        if (reachability == hostReach) {
            Reachability *reach = [Reachability reachabilityForInternetConnection]; 
            NetworkStatus netStatus = [reach currentReachabilityStatus];    
            if (netStatus==NotReachable)
            {
                NSLog(@"notreacheable");
            }
            else {
                NSLog(@"reacheable");
                [[NSNotificationCenter defaultCenter]postNotificationName:@"startUpdatingTable" object:nil];
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an app which requires internet. I want to use reachability class
I have a problem which describes here app crashes after checking network reachability in
In iOS dev it is common practice to use the Reachability class to check
I'm having a problem with Apple's Reachability class. I use it successfully from the
Possible Duplicate: How to use reachability class to detect valid internet connection? Iphone detect
I use Apple Reachability class from Apple Sample code Reachability in Xcode 4.2 and
This is the code I use with Reachability in my app: - (void) handleNetworkChange:(NSNotification
I currently try to use Reachability in iOS 5.1 on iPad. There is a
I am wondering.. Restkit keeps showing reachability information, request information as i use it.
i have tried to use the reachability-project published by apple to detect a reachability

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.