Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What you are asking is actually impossible and here is why: You can't validate that the network connection is active "for sure" (in the way that you want) without using it. In order to use it, you have to use it for something which means a connection with an expected resource X, Y or Z.</p> <p>As an example, consider this: What if you are connected to a local network that doesn't have external internet access? It would look like a connection is available, and in fact it does --- it just isn't what you had in mind.</p> <p>So you have to test against X, Y or Z to validate what you want to access is available.</p> <p>Added info:</p> <p>You can determine if a network connection is available:</p> <p>Look for: Reachability* internetReach;</p> <p>In Apple's example: <a href="http://developer.apple.com/library/ios/#samplecode/Reachability/Listings/Classes_ReachabilityAppDelegate_h.html#//apple_ref/doc/uid/DTS40007324-Classes_ReachabilityAppDelegate_h-DontLinkElementID_3" rel="nofollow">http://developer.apple.com/library/ios/#samplecode/Reachability/Listings/Classes_ReachabilityAppDelegate_h.html#//apple_ref/doc/uid/DTS40007324-Classes_ReachabilityAppDelegate_h-DontLinkElementID_3</a></p> <p>The problem is --- just because a network connection is available, and the above internetReach will --- it doesn't tell you anything about the connection. It could just be a local network. You can't find out until you try to connect something specific you expect to be available like, say, Apple.com or Google.com</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload