Page 1 of 2

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

Posted: Sun Feb 16, 2014 1:06 am
by Amanda

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?


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

Posted: Sun Feb 16, 2014 1:18 am
by Amanda

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


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

Posted: Sun Feb 16, 2014 2:41 am
by Igor

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.


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

Posted: Sun Feb 16, 2014 3:31 am
by Amanda

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);


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

Posted: Sun Feb 16, 2014 4:42 pm
by Igor

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.


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

Posted: Mon Feb 17, 2014 3:39 am
by Amanda

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


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

Posted: Mon Feb 17, 2014 4:34 am
by Illya Stepanov

Hi - Does it works when export as .ipa?


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

Posted: Mon Feb 17, 2014 5:00 am
by Amanda

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.


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

Posted: Mon Feb 17, 2014 6:11 pm
by Maryna Brodina

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.


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

Posted: Mon Feb 17, 2014 7:41 pm
by Amanda

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.