MobbID Cordova: Getting started
Introduction
MobbID SDK can be integrated easily with any Cordova project and Ionic projects using Cordova as native framework. This guide will help you to integrate MobbID SDK in your project.
Requirements
Application ID
You need an Application ID to use the MobbID SDK. If you do not have one, please contact us to get one.
API Key
You need an API Key to use the MobbID SDK. If you do not have one, please contact us to get one.
Cordova
- Cordova >= 9.x
Ionic
Cordova can be the native framework of your Ionic project. If you are using Capacitor, please take a look to the capacitor section. The plugin works with Angular, React and Vue Ionic projects.
Node
- Node >= 16.13.0
- npm > 7
- An NPM auth token is needed to access our repositories. If you do not have one, please contact us.
NOTE: Several versions of Node can be installed in the same machine using nvm. Once it is installed you can install your node version by executing the following:
$ nvm install 20.9.0 $ nvm use 20.9.0
Warning!: If you are using Cordova < 10, you need these versions: Node >= 6.0.0 npm > 6.9.0
Installation
Easiest way to install the MobbID Cordova plugin is using the npm registry. To do so, follow these steps:
- Add the following line in your
.npmrc
file in the root of your project (if it does not exist, just create it empty):
//registry.npmjs.org/:_authToken=the-provided-token
- Add the plugin to your project:
WARNING: This step may take several minutes, because it downloads the Android SDK.
npx cordova plugin add @mobbeel/mobbid-cordova-plugin
You can also install a specific version of the plugin:
npx cordova plugin add @mobbeel/mobbid-cordova-plugin@1.0.2
- Type the following in the root of your Cordova project:
npx cordova prepare
npx ionic cordova prepare
- To confirm your installation, type the following in your Cordova project:
npx cordova plugin list
npx ionic cordova plugin list
The MobbID plugin should appear like this (version can vary):
com.mobbeel.mobbid 2.0.0 "MobbID"
After the installation, you can start using the MobbID SDK in your project. To do so, please follow the How to use.