Trying to port my PhoneGap javascript code into Xcode for debugging in iOS. Using Cordova-3.0.0.
When I call:
navigator.connection.type
If you simply want to know if you are connected or not try using navigator.onLine in your js instead. Works for me on IOS 8 & Android 2.3 and doesn't require any plugins
Been doing my research on this one, and finally came up with the solution. Apparently PhoneGap (Adobe) recently updated their documentation, and filled in a lot of the holes I was running into for Phonegap 3.0.0
1) To do this using the command-line interface, you have to have git installed to be able to run those commands. Get git here.
2) They added to the Connection plugin documentation to use the following command-line interface commands to add the plugin to the project:
$ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git
$ cordova plugin rm org.apache.cordova.core.network-information
3) They updated the declaration in the config.xml file to the following (for iOS):
<feature name="NetworkStatus">
<param name="ios-package" value="CDVConnection" />
</feature>