我正在关注this教程,将推送通知应用到我的PhoneGap应用程序中。但是我在XCode中一直收到以下错误:
2014-06-03 22:50:38.425 Clubbed In[336:60b] CDVPlugin class PushPlugin (pluginName: PushPlugin) does not exist.
2014-06-03 22:50:38.425 Clubbed In[336:60b] ERROR: Plugin 'PushPlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2014-06-03 22:50:38.427 Clubbed In[336:60b] -[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [
"PushPlugin1224815266",
"PushPlugin",
"register",
[
{
"alert" : "true",
"ecb" : "onNotificationAPN",
"sound" : "true",
"badge" : "true"
}
]
我已将4个委托/插件文件成功放入我项目的插件文件夹中。另外,我添加了PushNotification.js并正确引用它。我的config.xml中还有以下功能标记:
<feature name="PushPlugin">
<param name="ios-package" value="PushPlugin" />
</feature>
有谁知道为什么我会收到此错误?我很确定我正确地手动安装了这个PushPlugin。
真正感谢任何帮助。我长期以来一直坚持这个问题......
谢谢!
答案 0 :(得分:1)
陷入同样的问题。您需要更改插件方法签名以匹配CVDPlugin.h的新接口。 e.g。
http://docs.phonegap.com/en/3.5.0/guide_platforms_ios_plugin.md.html#iOS%20Plugins