• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iPhone Testing Internet Connection?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iPhone Testing Internet Connection?


  • Subject: Re: iPhone Testing Internet Connection?
  • From: Markus Spoettl <email@hidden>
  • Date: Tue, 15 Dec 2009 19:30:58 +0100

On Dec 15, 2009, at 6:20 PM, David Duncan wrote:
> Don't use Reachability synchronously. At some point you will be blocked, you will hit a watchdog timer, and your application will be killed.


I find that a little misleading. It seems to depend on how you use the API. If you check for a specific host name that is certainly true, but if you just check for the presence of a network the response is quick.

The Readme of the Reachability sample states:

>>>>
You can use the API synchronously, but do not
issue a synchronous check by hostName on the main thread. If the device
cannot reach a DNS server or is on a slow network, a synchronous call to
the SCNetworkReachabilityGetFlags function can block for up to 30
seconds trying to resolve the hostName. If this happens on the main
thread, the application watchdog will kill the application after 20
seconds of inactivity.
<<<<<

I'm only posting this because after suffering a minor heart attack reading your post I thought it might be interesting for other readers as well.

Regards
Markus
--
__________________________________________
Markus Spoettl

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >iPhone Testing Internet Connection? (From: Chunk 1978 <email@hidden>)
 >Re: iPhone Testing Internet Connection? (From: David Duncan <email@hidden>)

  • Prev by Date: Re: Wierd Crash Report
  • Next by Date: Ideas for multi-type inspector design
  • Previous by thread: Re: iPhone Testing Internet Connection?
  • Next by thread: Help Debugging NSPredicateEditor reloadCriteria Exception
  • Index(es):
    • Date
    • Thread