In order to use Ionic Monitoring you must set up the Pro Client inside of your app. Follow along with our Pro Client Setup Guide. You should be on at least 1.0.19 of @ionic/pro .
Unfortunately, the Pro Client Setup Guide only explains how to get the ionic CLI, not the Pro Client.
Thus, I’m stuck not knowing how to include the Pro Client @ionic/pro in my existing ionic-3 app.
As I didn’t include @ionic/pro, I’m getting “Typescript Error Cannot find name ‘Pro’.” if I try to use the monitoring features like Pro.monitoring.log(...) .
Does anyone know whether the Pro Client is compatible to ionic 3 and how to resolve this issue? Thanks!
I found some documentation on installing the Pro Client in the section Deploy API:
Using the Ionic Pro Client
The Ionic Pro Client gives you access to the Deploy API inside of your app.
You simply need to install the latest version of the Pro Client:
npm install @ionic/pro@latest
Then you can import it in order to use the Deploy API in your code:
import { Pro } from '@ionic/pro';
Also, this documentation site links to an upgrade tutorial:
Deploy Upgrade Guide
You’ll need specific versions of each of the following libraries:
cordova-plugin-ionic-webview >= 2.0.0
cordoava-plugin-ionic >= 5.0.0
@ionic/pro >= 2.0.0
The following commands inside the root of you Ionic app should remove the old versions and install the new ones for you:
// remove the old version of the webview plugin
cordova plugin rm cordova-plugin-ionic-webview
// add the the new webview plugin
cordova plugin add cordova-plugin-ionic-webview@latest
// remove the old deploy plugin
cordova plugin rm cordova-plugin-ionic
// install the new deploy plugin
cordova plugin add cordova-plugin-ionic@latest --variable APP_ID=YOUR_APP_ID --variable CHANNEL_NAME=YOUR_CHANNEL_NAME
// install the new Pro SDK
npm install @ionic/pro@latest
Unfortunately, this does not make Pro.monitoring work.