title: how to detect iphone's VPN connectivity?
body: <p>I need to detect whether iphone is connected to VPN or not, programatically. I am developing a app which try to load URL, this page open only when device is connected to VPN. Before loading this URL I need to check VPN connectivity. I tried the following . But this is not working as expected.</p>
  
  <pre><code>- (BOOL)checkForVPNConnectivity {
    NSDictionary *dict = (__bridge NSDictionary *)(CFNetworkCopySystemProxySettings());
    //NSLog(@"cfnetwork proxy setting : %@", dict);
    return [dict count] &gt; 0; 
   }
  </code></pre>