Trying to port PhoneGap javascript code in Xcode for debugging in iOS. Using Cordova-3.0.0.
When i call:
navigator.connection.type
I get 'undefined' for navigation.
I did not include the network connection plugin correctly in my config.xml file or is something else wrong? Yes, I included the correct cordova.js file specifically for iOS. Yes, deviceready was fired.
Update: Currently, I only run this on the iOS emulator.
My config.xml:
<?xml version='1.0' encoding='utf-8'?> <widget id="com.app.test" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Hello Cordova</name> <description> Description </description> <author email=" dev@callback.apache.org " href="http://cordova.io"> Apache Cordova Team </author> <access origin="*" /> <preference name="fullscreen" value="true" /> <preference name="webviewbounce" value="true" /> <plugins> <plugin name="NetworkStatus" value="CDVConnection" /> </plugins> </widget>
Thank you for your help!
ios xcode cordova
chadiusvt
source share