简体   繁体   中英

camera.correctOrientation doesn't work on PhonegapBuild while works fine via cordova-cli

I develop an app using Apache Cordova (aka phonegap). I use cordova-camera-plugin with the option correctOrrientation: true and I use also the cordova-device-orientation-plugin to enable this feature. And it works fine when I compile with cordova-cli : cordova run android . But I have to use Phonegap Build in order to compile for ios because I work on PC/Linux. So I compile for ios and android on phonegap build platform.

When compiling with phonegap build, the correctOrientation: true option seems ignored, or maybe the device-orientation plugin broken ?

Anyone know this issue ? What difference with phonegap build ?

There are my local plugins :

$ cordova plugin ls
com.ionic.keyboard 1.0.2 "Keyboard"
nl.x-services.plugins.toast 2.0 "Toast"
org.apache.cordova.camera 0.3.0 "Camera"
org.apache.cordova.device 0.2.9 "Device"
org.apache.cordova.device-orientation 0.3.7 "Device Orientation"
org.apache.cordova.file 1.2.0 "File"
org.apache.cordova.file-transfer 0.4.4 "File Transfer"
org.apache.cordova.geolocation 0.3.8 "Geolocation"
org.apache.cordova.inappbrowser 0.5.0 "InAppBrowser"
org.apache.cordova.splashscreen 0.3.0 "Splashscreen"

And there is the configuration listed by phonegap build after uploaded my code on the platform :

Installed Plugins

Apps will be built with the latest version of a plugin unless you lock the version in your config.xml (see below). -- Plugin installed as a dependency of another plugin

Third Party VERSION LATEST VERSION
de.appplant.cordova.plugin.local-notification       0.7.4   0.7.4

PhoneGap Core
-- org.apache.cordova.device    0.2.8   0.2.8
org.apache.cordova.camera       0.2.9   0.2.9
org.apache.cordova.device       0.2.8   0.2.8
org.apache.cordova.device-motion    0.2.6   0.2.6
org.apache.cordova.device-orientation       0.3.5   0.3.5
org.apache.cordova.dialogs      0.2.6   0.2.6
org.apache.cordova.file     1.0.1   1.0.1
org.apache.cordova.file-transfer    0.4.2   0.4.2
-- org.apache.cordova.file      1.0.1   1.0.1
org.apache.cordova.geolocation      0.3.7   0.3.7
org.apache.cordova.inappbrowser     0.3.3   0.3.3
org.apache.cordova.network-information      0.2.7   0.2.7
org.apache.cordova.splashscreen     0.2.7   0.2.7
org.apache.cordova.vibration    0.3.7   0.3.7

I note that the versions differs a little but ... that's some basics features no ? Plus, I don't know how to upgrade the plugins on phonegap build, guess it is not possible...

It is only caused by the version of the plugin. Phonegap build seems to encounter some difficulties to get their available plugins up to date.

When phonegap build say 'latest available version' for a plugin, it means on phonegap build platform , while offical repositories often spread more recent versions.

Take care of that.

If you must use phonegap build to build your releases, but use to run locally your apps for development and tests, check before using a new cordova plugin, that the phonegap build version exists and works for your usage.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM