我正在遵循this教程,以将Push Notifications实现到我的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个委托/插件文件成功放入项目的plugin文件夹中。另外,我添加了PushNotification.js并正确引用了它。我的config.xml中也包含以下功能标签:
<feature name="PushPlugin">
<param name="ios-package" value="PushPlugin" />
</feature>
有谁知道为什么我会收到此错误?我很确定自己正确地手动安装了此PushPlugin。
任何帮助将不胜感激。我已经在这个问题上停留了很长时间了...
谢谢!
最佳答案
遇到同样的问题。您需要更改插件方法签名以匹配CVDPlugin.h的新接口。例如
http://docs.phonegap.com/en/3.5.0/guide_platforms_ios_plugin.md.html#iOS%20Plugins
关于ios - 找不到PushPlugin Cordova 3.5,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24028252/