Creating Plugin using .zip File of Cordova Plugin

Creating Plugin using .zip File of Cordova Plugin

  

I wrote a Cordova plugin to run zipped, compiled CoreML models for iOS apps but am having trouble getting the Outsystems plugin wrapper to compile (using the template provided by Outsystems).  I keep getting the error message "Invalid Cordova plugin: my-cordova-plugin.zip"

I followed the documentation here, https://success.outsystems.com/Documentation/10/Extensibility_and_Integration/Mobile_Plugins/Using_Cordova_Plugins#Plugin_JSON_Template . My problem looks similar to this https://www.outsystems.com/forums/discussion/33495/creating-my-own-cordova-plugin/ , but that thread didn't help me figure out my problem. 

To make it simpler to figure out, I downloaded the cordova-plugin-vibration plugin using the link https://github.com/apache/cordova-plugin-vibration#2.1.2 that is listed in the Extensibility Configuration JSON for the VibrationPlugin downloaded from the Forge.  I downloaded the zip file for the plugin using the "Clone or download" button on the git page.  I changed the file name from cordova-plugin-vibration-master.zip to cordova-plugin-vibration.zip.

Then I changed the Extensibility Configuration JSON in my Outsystems plugin to:

{
    "resource": "<cordova-plugin-vibration.zip>",
    "plugin": {
        "resource": "cordova-plugin-vibration.zip"
    }
}

Published it and then included it in a test app.  When I try to compile the test app, I keep getting the same error that I assume indicates that the compile process can't find the zip file. I've tried compiling it as both private and public. Also, messed around with file paths but alas, no luck.

Am I missing something? .. I can't put my plugin on git until I get approval so I have to use the zip approach.

Using Service Studio 10.0.822.0

Hi John,

Looking at your Extensability Configuration it doesn't seem right.

It should be:

{
    "resource": "cordova-plugin-vibration.zip",
    "plugin": {
        "resource": "cordova-plugin-vibration"
    }
}

Where "cordova-plugin-vibration.zip" is the name of the resource file. And "cordova-plugin-vibration" is the name of the plugin.

Can you try that and let us know how it went?

Cheers,

José