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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:29:59+00:00 2026-06-16T17:29:59+00:00

I have a classic Apple reachability class which is not adapted to ARC. It

  • 0

I have a classic Apple reachability class which is not adapted to ARC. It defines the network pretty well but it has some mistake that I can’t figure out. I’ve left the whole class unchanged and in the method of another class, I have implemented the following methods to define the connectivity. Here’s my BOOL value that changes whenever the internet is available:

- (BOOL) checkForInternetConnection {

    [self checkNetworkStatus:nil];
    if (isConnection || is3G) {
        return YES;
    } else {
        return NO;
    }
}

And here’s the standard Reachability method:

-(void) checkNetworkStatus:(NSNotification *)notice
{

    NetworkStatus internetStatus = [internetReachable currentReachabilityStatus];
    switch (internetStatus)
    {
        case NotReachable:
        {
            isConnection = NO;
            is3G = NO;
        }
        case ReachableViaWiFi:
        {
            isConnection = YES;
            is3G = NO;
            break;
        }
        case ReachableViaWWAN:
        {
            NSLog(@"Connected via 3G");
            is3G = YES;
            break;
        }
    }

    NetworkStatus hostStatus = [hostReachable currentReachabilityStatus];
    switch (hostStatus)
    {
        case NotReachable:
        {
            isConnection = NO;
            is3G = NO;
            NSLog(@"No Network");
            break;
        }
        case ReachableViaWiFi:
        {
            NSLog(@"Connected via WiFi");
            isConnection = YES;
            is3G = NO;
            break;
        }
        case ReachableViaWWAN:
        {
            NSLog(@"Connected via 3G");
            is3G = YES;
            break;
        }
    }
}

The problem I’m getting is well seen in the NSLog output I get:

2012-12-24 11:19:41.045 Custom Queue[1723:907] Connected via 3G
2012-12-24 11:19:41.046 Custom Queue[1723:907] No Network
2012-12-24 11:19:41.047 Custom Queue[1723:907] Connected via 3G
2012-12-24 11:19:41.048 Custom Queue[1723:907] No Network

After a few seconds it informs me that all is well:

2012-12-24 11:20:11.101 Custom Queue[1723:907] Connected via 3G
2012-12-24 11:20:11.112 Custom Queue[1723:907] Connected via 3G
2012-12-24 11:20:11.113 Custom Queue[1723:907] Connected via 3G

But due to the fact that it thinks that the host is unreachable and gives me the message that there’s no connection, I have another function that fires when the Internet is unavailable.

How do I change it so it sees the Internet connection faster, without that occasional “no network” message?

  • 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-16T17:30:00+00:00Added an answer on June 16, 2026 at 5:30 pm

    I ended up using Reachability version from Tony Million.
    It’s great and easy to use. Moreover, it’s ARC and iOS 5 (and up) ready.

    You can get it here:

    https://github.com/tonymillion/Reachability

    Thanks, Tony!

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

Sidebar

Related Questions

I have a classic ASP application which inserts some values into a word file
i have a classic asp page with inside the following vbscript but it say
I have a classic asp page which generates a PDF serves it to the
I have classic AsyncTask to load image: private class DownloadImageTask extends AsyncTask<String,Void,Bitmap> { Bitmap
This question is about Mac OS Classic , which has been obsolete for several
I have a classic asp page from which I open a popup page in
We have a classic ASP site that has some pages that do some extreme
I have a bunch of old classic ASP pages, many of which show database
I have a classic parent-collection of children relationship that is being used in a
I have a classic HTML select box: Show: <select name=show id=showThreads> <option value=all selected=selected>All</option>

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.