SDK Installation

Adding MoEngage Plugin

Add cordova-moengage-core plugin to Ionic project as shown below :

Shell
$ ionic cordova plugin add cordova-moengage-core --variable APP_ID="[your_workspace_id]"

Variables

  • APP_ID = Workspace id found under the settings page on the MoEngage dashboard.

Plugin Name Update

Starting from version 5.0.2, we have changed the name of our plugin. Earlier it was registered as moengagesdk and now it is renamed to cordova-moengage-core. In case if you are updating from version 5.0.1 or earlier. Please make sure to remove the older version of the plugin first and then install the newer plugin as shown below:

Shell
$ ionic cordova plugin rm cordova-plugin-moengage
$ ionic cordova plugin add cordova-moengage-core --variable APP_ID="[your_workspace_id]"

MoEngage Declaration

Make sure you add the below line to your typescript files before calling any MoEngage SDK API.

TypeScript
declare var MoECordova: any;
info

Refer Cordova Docs

As you can see the plugin used here for Ionic is the same which is built by us for Cordova framework, therefore please follow the Cordova SDK Documentation starting from the SDK Installation for integrating the plugin to your project and using the different feature provided in the plugin.

Previous

Next

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?