PushPlugin Not Found Cordova 3.5 - ios

I am following this tutorial to implement Push Notifications into my PhoneGap application. However I keep getting the following error in 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"
}
]
I have put the 4 delegate/plugin files into my project's plugin folder successfully. In addition, I have added the PushNotification.js and referenced it correctly. I also have the following feature tags in my config.xml:
<feature name="PushPlugin">
<param name="ios-package" value="PushPlugin" />
</feature>
Does anyone know why I would be getting this error? I am pretty sure that I correctly manually installed this PushPlugin.
Any help would truly be appreciated. I have been stuck on this problem for a long time...
Thanks!

Ran into the same issue. You need to change your plugin method signatures to match the new interface of CVDPlugin.h. e.g.
(void)myMethod:(CDVInvokedUrlCommand*)command;
http://docs.phonegap.com/en/3.5.0/guide_platforms_ios_plugin.md.html#iOS%20Plugins

Related

Accessing iOS native code with PhoneGap, build issue

I've wrote a very simple plugin and added it to my config.xml:
<feature name="FileWriter">
<param name="ios-package" value="FileWriter" />
</feature>
after executing "Cordova prepare" it does not copy it to the staging/config.xml, and thus when I run the app I get an error:
2014-11-18 14:12:58.929 iOS Test[1280:723270] -[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [
"FileWriter1220649673",
"FileWriter",
"cordovaGetFileContents",
[
]
]
If I manually add the feature to the config.xml found in the platform folder it works fine.
Basically there seems to be some sort of step missing in the "cordova prepare" step which is not copying this feature. All of the other elements in the base config.xml are copied properly to the platform specific one.
I've based the code off of the tutorial here
Follow the oficial tutorial instead
http://docs.phonegap.com/en/3.5.0/guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide
The one you linked is missing the part of the plugin.xml, that's the file read on cordova prepare to copy the necessary files to the iOS project.

PushPlugin not found for iOS PhoneGap

I just installed PhoneGap 3.5 and the PushPlugin using the PhoneGap CLI. I created a project using the PhoneGap CLI. In the receivedEvent method of index.js, I added these lines:
var pushNotification = window.plugins.pushNotification;
pushNotification.register(myTokenMethod, onError, {"badge": "true", "sound": "true", "alert":"true", "ecb": "mycallback"}
this leads to the error in xCode of:
CDVPlugin class PushPlugin (pluginName: PushPlugin) does not exist
ERROR: Plugin 'PushPlugin' not found or is not a CDVPlugin. Check your plugin mapping in config.xml
And although the instructions do not indicate I need to for automatic installation of the plugin, I went ahead and added
<feature name="PushPlugin">
<param name="ios-package" value="PushPlugin" />
</feature>
to my config.xml and receive the same error. The plugin version is 2.4, I am using an iPhone 6 as a test device and xCode 6.
Any ideas where to look?
Make sure your PushPlugin.m inside Build Phases > Compile Sources

PhoneGap error: Plugin 'LowLatencyAudio' not found, or is not a CDVPlugin

We're using PhoneGap 3.4. We installed the LowLatencyAudio plugin, following the instructions here: https://github.com/triceam/LowLatencyAudio
However, we see the following error:
2014-03-10 19:59:25.960 S[7828:60b] CDVPlugin class LowLatencyAudio (pluginName: LowLatencyAudio) does not exist.
2014-03-10 19:59:25.962 S[7828:60b] ERROR: Plugin 'LowLatencyAudio' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2014-03-10 19:59:25.963 S[7828:60b] -[CDVCommandQueue executePending] [Line 127] FAILED pluginJSON = [
"INVALID",
"LowLatencyAudio",
"preloadFX",
[
"sounds\/right.mp3",
"sounds\/wrong.mp3"
]
]
the mapping does exist in config.xml. we invoke the code with:
LowLatencyAudio.preloadFX( GUESS_RIGHT_SOUND, GUESS_RIGHT_SOUND);
LowLatencyAudio.preloadFX( GUESS_WRONG_SOUND, GUESS_WRONG_SOUND);
we have also tried:
PGLowLatencyAudio.preloadFX( GUESS_RIGHT_SOUND, GUESS_RIGHT_SOUND);
PGLowLatencyAudio.preloadFX( GUESS_WRONG_SOUND, GUESS_WRONG_SOUND);
both approaches fail, and only the LowLatencyAudio one generates error messages.
Found the answer here: Cordova iOS plugins not found
Make sure the plugin source classes have their "target membership" include the right applications.

Cordova / Wikitude - ERROR: Plugin 'WikitudePlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml

I'm using wikitude and cordova plugin for my augmented reality iOS mobile app project in xcode5. I got this error when try to execute WikitudePlugin.loadARchitectWorld(successCallback, errorCallback, "path/to/your/world"); command.
2014-01-29 11:23:22.152 Bii[5441:60b] ERROR: Plugin 'WikitudePlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2014-01-29 11:23:22.154 Bii[5441:60b] -[CDVCommandQueue executePending] [Line 117] FAILED pluginJSON = [
"WikitudePlugin308741238",
"WikitudePlugin",
"open",
[
"ENTER-YOUR-KEY-HERE",
null
]
]
I already add WTWikitudePlugin h/m into my project. This is my config.xml
<feature name="WTWikitudePlugin">
<param name="ios-package" value="WTWikitudePlugin"/>
</feature>
Why?
I would make sure your Wikitude plugin header and source files are in the Plugins folder in your Xcode project. I would then verify what the interface name of this plugin is.
<feature name="WTWikitudePlugin">
<param name="ios-package" value="WTWikitudePlugin"/>
</feature>
Particulary, you want to pair up the value in the <feature> tag to the interface name in your header/source file. This is how config.xml links the plugins. The JavaScript file will call the plugin using the "name" property - so this is how Cordova links the JavaScript to the config.xml, to the native library.
Seems to me that you're using a old version of PhoneGap. The current release (PhoneGap 3.3) uses Plugman to manage plugin installation.
Using Plugman, the feature name is WikitudePlugin.
So try to use WikitudePlugin instead of WTWikitudePlugin.
In my case, i removed and re-added wikitude plugin. In result it broke references in xcode project then starts showing this error.
I had to add all the frameworks and compile source files manually.
To do that go to Build Phases
Drag missing .m files in Plugins (possibly WTWikitudePlugin.m and WTARViewController.m) directory to 'Compile Sources' section
Drag all files in Frameworks to 'Link Binary With Libraries' section

ERROR: Plugin 'EmailComposer' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml

I am using Cordova 2.8.1 and am generated application using Terminal.
And i added EmailComposer.h & EmailComposer.m files in Plugins
and EmailComposer.js file in www.
<script type="text/javascript" charset="utf-8" src="EmailComposer.js"></script>
added in index.html.
In plist file i added key: EmailComposer and value: EmailComposer in Plugins.
And finally in config.xml i added
<feature name="Plugin">
<param name="ios-package" value="CDVPlugin"/>
</feature>
In button action am calling method
Cordova.exec(null, null, 'EmailComposer','showEmailComposer', ["emailID#gmail.com", "message"])
But am getting error as follows
ERROR: Plugin 'EmailComposer' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
-[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [
"INVALID",
"EmailComposer",
"showEmailComposer",
[
"emailID#gmail.com",
"message"
]
]
Any suggestions for this problem
Thanks in advance.
Try this in config.xml:
<feature name="EmailComposer">
<param name="ios-package" value="EmailComposer"/>
</feature>
The first "EmailComposer" is the name of this plugin in JS side, and the second "EmailComposer" is the class name of this plugin in native(Objective-C) side .

Resources