Amanda
Posts: 0
Joined: Fri Jan 17, 2014 5:33 am

Adding a PhoneGap plugin, and getting an error: Plugin 'Calendar' not found, or is not a CDVPlugin. Check your plugin ma

I am trying to add this:
https://github.com/EddyVerbruggen/Cal...

I am only testing in iOS right now. I looked at the "Beep" tutorial in your documentation. Here's what I've added:

ios/[Project]/[Project]/Resources/www/project/files/resources/lib/nl.x-services.plugins.calendar/www/Calendar.js

ios/[Project]/[Project]/CordovaLibPlugins/nl.x-services.plugins.calendar/Calendar.h

ios/[Project]/[Project]/CordovaLibPlugins/nl.x-services.plugins.calendar/Calendar.m

I edited ios/[Project]/[Project]/Resources/www/project/files/resources/lib/cordova_plugins.js to add:
{
"file": "plugins/nl.x-services.plugins.calendar/www/Calendar.js",
"id": "nl.x-services.plugins.Calendar",
"clobbers": [
"Calendar"
]
}

I edited ios/[Project]/[Project]/config.xml to add:

Code: Select all

     param name="ios-package" value="Calendar"  

And when I compile to .ipa and run on my phone I get this in the xcode console:

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

I noticed that this plugin requires EventKit.framework and EventKitUI.framework, so I exported to xcode project, manually added them, and built it to run on my phone. Same error as above.

I must be doing something wrong with placing and referencing these files, but what?

Amanda
Posts: 0
Joined: Fri Jan 17, 2014 5:33 am

Adding a PhoneGap plugin, and getting an error: Plugin 'Calendar' not found, or is not a CDVPlugin. Check your plugin ma

Sorry, this is what is in config.xml:
<feature name="Calendar">
<param name="ios-package" value="Calendar" />
</feature>

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Adding a PhoneGap plugin, and getting an error: Plugin 'Calendar' not found, or is not a CDVPlugin. Check your plugin ma

Hello,

I've added this plugin in xCode project using steps which you provided but I can't reproduce such error. Please try to add this plugin one more time.

Amanda
Posts: 0
Joined: Fri Jan 17, 2014 5:33 am

Adding a PhoneGap plugin, and getting an error: Plugin 'Calendar' not found, or is not a CDVPlugin. Check your plugin ma

I didn't add it in xCode -- I added it in the source files in Appery. Also, you only get the error when you try to call the function, as in:

var startDate = new Date("March 24, 2014 13:00:00");
var endDate = new Date("March 24, 2014 14:30:00");
var title = "My nice event";
var loc = "Home";
var x = "Some notes about this event.";

var success = function(message) { alert("Success: " + JSON.stringify(message)); };
var error = function(message) { alert("Error: " + message); };

// create
window.plugins.calendar.createEvent(title,loc,x,startDate,endDate,success,error);

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Adding a PhoneGap plugin, and getting an error: Plugin 'Calendar' not found, or is not a CDVPlugin. Check your plugin ma

Please share your project with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and tell us the steps how to reproduce an error.

Amanda
Posts: 0
Joined: Fri Jan 17, 2014 5:33 am

Adding a PhoneGap plugin, and getting an error: Plugin 'Calendar' not found, or is not a CDVPlugin. Check your plugin ma

I found the problem. The subfolder of CordovaLibPlugins that I created is not getting exported from Appery to xcode, or presumably getting compiled into the .ipa. It is interesteing to note that the CordovaLibPlugins folder is also not highlighted in blue.

Image

Amanda
Posts: 0
Joined: Fri Jan 17, 2014 5:33 am

Adding a PhoneGap plugin, and getting an error: Plugin 'Calendar' not found, or is not a CDVPlugin. Check your plugin ma

No. Same error whether going directly to .ipa, or going to xcode. I added the files in xcode and built the app that way; I no longer get the error when I do that. The plugin still isn't working perfectly (error and crash when adding to the calendar) but that's probably nothing to do with Appery.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Adding a PhoneGap plugin, and getting an error: Plugin 'Calendar' not found, or is not a CDVPlugin. Check your plugin ma

Hello! Unfortunately there is no way to do step 4 in builder (Link Binary With Libraries ... EventKit.framework and EventKitUI.framework). So it's not possible to add this plugin in builder.

Amanda
Posts: 0
Joined: Fri Jan 17, 2014 5:33 am

Adding a PhoneGap plugin, and getting an error: Plugin 'Calendar' not found, or is not a CDVPlugin. Check your plugin ma

Yes, I know, Maryna, and I will continue to do that step in xcode. I just thought you would want to know that when I added files in the source tab, they did NOT get exported to xcode nor the .ipa. That part seems like a bug to me.

Return to “Issues”