Installation
The plugin wraps the native MobbID SDKs for Android and iOS and supports Angular, React and Vue projects.
1. Add the token
Add the token to the .npmrc file at the root of your project (create it if it does not exist):
.npmrc
//registry.npmjs.org/:_authToken=YOUR_NPM_TOKEN
Keep the token out of source control
2. Install the plugin
The plugin is compatible with Capacitor and Apache Cordova.
npm install @mobbeel/mobbid-cordova-plugin
The installation downloads the native iOS SDK and may take a few minutes.
If your app does not have the native projects yet, add them:
Install @capacitor/android and @capacitor/ios at the same version as @capacitor/core in your project.
- Android
- iOS
npm install @capacitor/android
npx cap add android
npx cap sync
npx cap open android
npm install @capacitor/ios
npx cap add ios
cd ios/App && pod install && cd ../..
npx cap sync
npx cap open ios
3. Configure the project
- Android
- iOS
The plugin resolves the Android SDK from Mobbeel's Maven repository (repository.mobbeel.com). Add the credentials provided by Mobbeel to android/gradle.properties or android/local.properties:
android/gradle.properties
androidRepositoryReadOnlyUser=YOUR_USERNAME
androidRepositoryReadOnlyPassword=YOUR_PASSWORD
Keep credentials files out of version control
Add the usage descriptions to ios/App/App/Info.plist:
Info.plist
<key>NSCameraUsageDescription</key>
<string>The camera is used to verify your identity with your face.</string>
Troubleshooting
npm installfails with 401 or 404Check the token in.npmrc. Contact Mobbeel if you do not have one.The app closes when the camera opens on iOS
Declare the usage descriptions inInfo.plist.
Next step
Quick start
Initialise the plugin and verify your first user.