简体   繁体   English

Cordova 3.3“设备”插件无法在iOS版本上使用

[英]Cordova 3.3 “device” Plugin not working on an iOS build

Installed the plugin using the direction. 按照说明安装插件。 None of the device properties work in the index.js. 没有任何device属性在index.js中起作用。 When used they all hang up the device. 使用时,它们都会挂断设备。

installed cordova. 安装科尔多瓦。

did a build for ios then 然后为ios进行了构建

phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git

the in the index.js after deviceready have an alert for device.name or device.uuid or any-other device property will not work deviceready后在index.js中有关于device.namedevice.uuid的警报,否则任何其他设备属性将不起作用

Hi "git" is also a node module. 嗨,“ git”也是一个节点模块。 you should install plugin like this. 您应该这样安装插件。

npm install -g git npm install -g git

This will install git in you node source location as a module. 这会将git作为模块安装在您的节点源位置。

Restart the machine. 重新启动机器。

Install phonegap plugin: C:\\Users\\user1\\yourprojectname>cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git 安装phonegap插件:C:\\ Users \\ user1 \\ yourprojectname> cordova插件添加https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git

You will get response as: Fetching plugin from " https://git-wip-us.apache.org/repos/asf/cordova-plugin-cam era.git"... Starting installation of "org.apache.cordova.camera" for android Preparing android project org.apache.cordova.camera installed on android. 您将得到如下响应:从“ https://git-wip-us.apache.org/repos/asf/cordova-plugin-cam era.git”获取插件...开始安装“ org.apache.cordova。相机”为android准备在android上安装的android项目org.apache.cordova.camera。

Hope this will be very helpful. 希望这会很有帮助。 If any issue reply. 如果有任何问题,请回复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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