[Media Capture Plugin] Upgrading Plugin to Mabs 7
Question
Forge component by JohnGB

Does anyone have any experience updating a plugin to support Mabs 7?

From Outsystems documentation:

Using context.requireCordovaModule to load non-cordova modules is not supported anymore. Trying to build an app on MABS 7 with a plugin that uses context.requireCordovaModule, causes a message similar to:

Error installing Cordova plugin: {0}. Using "requireCordovaModule" to load non-cordova modules {PLUGIN NAME} is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

Workaround

Replace context.requireCordovaModule with require and define the dependencies on package.json. Skip this for modules that belong to Node.

Has anyone done this before?

I have multiple plugin that I need to update to be compatible for example

https://github.com/apache/cordova-plugin-media-capture 

I have tried looking for the context.requireCordovaModule but there is no reference to it at all in any file in the plugin any help would be appreciated.


Hi @Johann Botha 

Did you try to compile with other version of mabs?

In order to do that, please go to Service Center -> Applications -> Your app -> Tab Distribute. Click in Configure (for the platform that you pretend, iOS or Android) and then you can change your MABS version (for that application).

Instead of selecting Always use the latest version available option, please select Specific version option:


After that, you just need to click in Save and Generate and it will automatically generate your build.

Regards

Gonçalo Almeida

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.