views:

21

answers:

1

sometimes is up sometime is down, how to programmatic test that connection is available?

A: 

Look at the SCNetworkReachability class and reachability example app.

hotpaw2
But in fact even the iOS reachability code won't tell you if there is a break somewhere in the network farther than the 1st hop from the device. So one recommendation is to just try and connect to your actual network destination, but offer the user a way to cancel out if the wait is long enough.
hotpaw2