I have a problem with my phonegap-based project, and I'm suspecting I'm running a different version than I think. the config.xml file I'm using states it's 2.0.0, while I thought it's 2.9.
Is there a way to actually check the phonegap version in xcode, and not relay on a comment in a single file?
Thank you!
I thought I would add to @user1279357's answer, which demonstrates how to acquire the version of Cordova from the JavaScript side. However, on the Objective-C side, if you add #import <Cordova/CDVAvailability.h>
you can call the constant: CORDOVA_VERSION_MIN_REQUIRED
.
This constant is an int
that will provide you with the version of Cordova you are using. The value is in the form of: 20000 = 2.0, 20800 = 2.8 e.t.c.
If you need to do checks against this value, there are other constants defined in this file for each of the versions, e.g. __CORDOVA_2_0_0
= 2.0.
Look here to see the source file for CDVAvailability.h
.
you can use device object's cordova(device.cordova) property to get the version of phonegap. Below link provides more information for same. http://docs.phonegap.com/en/3.0.0/cordova_device_device.md.html#Device
I have a problem with my phonegap-based project, and I'm suspecting I'm running a different version than I think. the config.xml file I'm using states it's 2.0.0, while I thought it's 2.9.
Is there a way to actually check the phonegap version in xcode, and not relay on a comment in a single file?
Thank you!
I thought I would add to @user1279357's answer, which demonstrates how to acquire the version of Cordova from the JavaScript side. However, on the Objective-C side, if you add #import <Cordova/CDVAvailability.h>
you can call the constant: CORDOVA_VERSION_MIN_REQUIRED
.
This constant is an int
that will provide you with the version of Cordova you are using. The value is in the form of: 20000 = 2.0, 20800 = 2.8 e.t.c.
If you need to do checks against this value, there are other constants defined in this file for each of the versions, e.g. __CORDOVA_2_0_0
= 2.0.
Look here to see the source file for CDVAvailability.h
.
you can use device object's cordova(device.cordova) property to get the version of phonegap. Below link provides more information for same. http://docs.phonegap.com/en/3.0.0/cordova_device_device.md.html#Device
0 commentaires:
Enregistrer un commentaire