title: Check internet connection on iOS app with Cordova Phonegap 3.3.0 not working
body: <p>I have tried following <a href="http://cordova.apache.org/docs/en/3.3.0/cordova_connection_connection.md.html#The%20Command-Line%0AInterface">this</a> guide on Cordova docs, but it doesn't seem to work.</p>
  
  <p>Here is my code:</p>
  
  <p>I have added <code>&lt;plugin name="NetworkStatus" value="CDVConnection" /&gt;</code> to <code>config.xml</code>.</p>
  
  <p>and this script to my <code>index.html</code>:</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
  
  
          document.addEventListener("deviceready", onDeviceReady, false);
  
          // device APIs are available
          //
          function onDeviceReady() {
              alert("1"); // runs this alert
              checkConnection();
          }
  
          function checkConnection() {
              var networkState = Connection.CELL;
              alert("2"); // doesn't run this
  
              var states = {};
              states[Connection.UNKNOWN]  = 'Unknown connection';
              states[Connection.ETHERNET] = 'Ethernet connection';
              states[Connection.WIFI]     = 'WiFi connection';
              states[Connection.CELL_2G]  = 'Cell 2G connection';
              states[Connection.CELL_3G]  = 'Cell 3G connection';
              states[Connection.CELL_4G]  = 'Cell 4G connection';
              states[Connection.CELL]     = 'Cell generic connection';
              states[Connection.NONE]     = 'No network connection';
  
              alert('Connection type: ' + states[networkState]);
          }
  
      &lt;/script&gt;
  </code></pre>
  
  <p><code>var networkState = Connection.CELL;</code> seems to cause the problem as it doesn't run the following alert, I have also tried <code>navigator.connection.type</code> but the same thing happened.</p>
  
  <p>When I run the app in Chrome the console outputs the following error:</p>
  
  <pre><code>Uncaught ReferenceError: Connection is not defined 
  </code></pre>
  
  <p>Anybody know how to solve this problem?</p>
  
  <p>Cheers</p>