How to add ionic devApp support in a cordova plugin

218 views Asked by At

I have a cordova plugin which supports Android, iOS and browser platforms. But when adding the plugin in an ionic app that is being developed/built using ionic serve or ionic devApp, the error comes as 'plugin is not defined'. Is there a way to add the ionic devApp support to a cordova plugin ? If it means only using the browser code for all the platforms(Not using any native platform code), then it works for me. Thanks in advance.

I have added the browser platform to my plugin but it does not work with ionic serve even when the app is running on browser. Note that the plugin works fine on browser when the app is run using ionic cordova run browser command.

I want the cordova plugin to be compatible with all platforms - Android, iOS , browser and devApp. My expectation are that when the app is run using ionic cordova run android/ios/browser command, it should use the native code of my cordova plugin. And when the app is run using ionic serve or ionic devApp, then it should use the web code.

0

There are 0 answers