我已经将项目从 Cordova 3.4 更新到 3.6.3,但一切都崩溃了(像往常一样)。
但具体来说,这里org.apache.cordova.dialogs
插件在 ios 上运行时无法工作。
Cordova 表示插件已安装:
$ cordova plugins ls
org.apache.cordova.dialogs 0.2.9 "Notification"
org.apache.cordova.vibration 0.3.10 "Vibration"
在 config.xml (平台目录之外的一个)中,我添加了:
<feature name="Notification">
<param name="ios-package" value="CDVNotification" />
</feature>
当我在 JavaScript 中尝试创建这样的警报时(并且设备已准备就绪):
navigator.notification.alert("Test alert", null);
我在 XCode 调试器中抛出此错误(为了便于阅读,我添加了换行符)
2014-09-18 15:03:26.327 Milk[3045:60b]
CDVPlugin class CDVNotification (pluginName: Notification) does not exist.
2014-09-18 15:03:26.328 Milk[3045:60b]
ERROR: Plugin 'Notification' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2014-09-18 15:03:26.329 Milk[3045:60b]
-[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [
"INVALID",
"Notification",
"alert",
[
"Test alert",
"Alert",
"OK"
]
]
我努力了cordova plugin rm
/ cordova plugin add
并且还在运行cordova platform rm
添加和删除ios。
那么:“CDVPlugin 类 CDVNotification(pluginName:Notification)不存在。”?
Cordova 说已安装,我该如何解决这个问题?