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

  • Home
  • SEARCH
  • 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 3241110
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:09:41+00:00 2026-05-17T18:09:41+00:00

when iPhone connects to a wireless router, and that router is not connected to

  • 0

when iPhone connects to a wireless router, and that router is not connected to the internet? i need to display an error message saying “check you internet connection” i tried the Reachability sample code. but no luck,
http://developer.apple.com/library/ios/#samplecode/Reachability/Listings/ReadMe_txt.html

when i disable the WIFI in phone it’s working fine, i tried the Checking For Internet Connectivity in Objective C sample code “isDataSourceAvailable” even itz not working,can any one help me to fix this issue, really appriciate.

  • 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-17T18:09:41+00:00Added an answer on May 17, 2026 at 6:09 pm

    You could do something like this:

    + (BOOL) pingServer
    {
        NSURL *url = [NSURL URLWithString:@"http://some-url-that-has-to-work/"];
        NSURLRequest *request = [NSMutableURLRequest requestWithURL:url];
        NSHTTPURLResponse *response = nil;
        [NSURLConnection sendSynchronousRequest:request
            returningResponse:&response error:NULL];
        return (response != nil);
    }
    

    This is a synchronous request, so that it will block the current thread. You can do the whole network check in a background thread, so that blocking it won’t matter, or you can send the request asynchronously. Also you might want to set the HTTP method to HEAD, so that you won’t download the whole resource.

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

Sidebar

Related Questions

I've got an iPhone app that runs on the device. Now I need to
I'm trying to create an iPhone app that connects to FB using their API.
I am developing an iPhone application in which i need to connect with twitter.
I am trying to create an iPhone application which in some point connects to
I'm developing some sort of air mouse application for iPhone platform. This applications connects
I am working with an iphone application in xcode that uses the google weather
I've just recently started programming for the iPhone and I'm making an application that
I have an application that connects fine over http. When trying https I got
I want to create an application core that connects to a webservice, downloads the
My iPhone connects over adhoc wifi to a wifi sensor module. The challenge is

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.