MobbScan Cordova: Getting started
Introduction
MobbScan can be integrated easily with any Cordova project and Ionic projects using Cordova as native framework.
Requirementes
License
A license key bounded to your application is needed to start using the SDK. Please, contact us to obtain one.
Cordova
- Cordova >= 7
Ionic
Cordova should 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 and React project types.
Node
- Node 10.*
npm
> 6.9.0- An NPM auth token is needed to access our repositories. If you do not have one, please contact us. Please be aware that this token is not related to the MobbScan license required to be used with the SDK.
NOTE: Several versions of Node can be installed in the same machine using nvm. Once it is installed you can install Node 10 by executing the following:
$ nvm install 10 $ nvm use 10
Warning!: If you are using Cordova >= 10, you need these versions: Node 16.* npm > 7
Tooling
If you use a plugin version prior to v2.18.5 you need these tools:
wget
unzip
WARNING: These tools are needed for the plugin istallation. Please, check you have them installed before begin the plugin installation.
Operating System
Windows systems installation are allowed from v2.18.5 of the plugin.
Installation
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 following line to the project
config.xml
file, if you want to add the last version of the plugin:<plugin name="com.mobbeel.mobbscan" spec="npm:@mobbeel/mobbscan-cordova-plugin@^2.27.0"/>
Or, if you are using Cordova >= 10 add the following line instead:
<plugin name="com.mobbeel.mobbscan" spec="@mobbeel/mobbscan-cordova-plugin@^2.27.0"/>
You can also install a specific version of the plugin:
<plugin name="com.mobbeel.mobbscan" spec="@mobbeel/mobbscan-cordova-plugin@2.26.4"/>
Type the following in the root of your Cordova project:
WARNING: This step will take several minutes, because it downloads the Android and iOS SDKs.
$ 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 MobbScan plugin should appear like this (version can vary):
com.mobbeel.mobbscan 2.20.0 "MobbScan"
WARNING: Following these steps, you will have the MobbScan Cordova plugin with all its functionality. If you want to exclude some of its functionality, take a look on this section.
iOS Configuration
Since version 2.16.0 and later, iOS SDK is distributed as an xcframework
and the Cordova plugin does not add them to Link Binaries with Libraies
section, as you can see below:
Therefore, you must add all the MobbScan xcframeworks, as in the picture below: