Follow the steps below to get your EUM App Key and instrument your Cordova-based apps.
To use the AppDynamics Cordova plugin, your hybrid application must be using the following:
- Cordova 8.0.0+
- npm 3.10.10+
- Node.js v6.11.3+
Get Your Application Key
After you completed the Getting Started Wizard, you were given an EUM App Key. You will need this key when you modify the source code. In some cases, multiple mobile applications can share the same key.
If you have completed the Getting Started Wizard, but don't have your EUM App Key, see Get Your Application Key.
Install the Cordova Plugin
The AppDynamics Cordova plugin is certified to work with the Ionic and PhoneGap frameworks. Thus, the installation instructions below are for Ionic and PhoneGap applications. You should also be able to use the plugin for other Cordova-based frameworks. See the plugin installation instructions for your Cordova-based framework.
From the root directory of your Ionic application, run the commands below to install the plugin. See the Ionic plugin documentation for more information.
From the root directory of your PhoneGap application, run the commands below to install the plugin. See the PhoneGap plugin documentation for more information.
Initialize the Plugin Instrumentation
In a component that is called when the application starts, initialize the Cordova plugin and start instrumentation with the method
initWithConfiguration. You pass the configuration object that specifies the app key, Screenshot Service URL, and logging level, and pass methods to handle both success and error use cases:
Configure the Cordova Plugin for iOS
You can set static configurations in the plist file for the iOS platform. See Static Configuration for Hybrid Support for more information.
Customize the Cordova Application Instrumentation
See Customize the Cordova Application showing how to use the Cordova SDK through examples and brief explanations.