Cordova
This is a guide to implement Incode in the Apache Cordova
Requirements
Cordova development environment setup
Supported Android Version:
API 21+ & CompileSDK version 31.
Supported iOS Version
iOS 13+
Plugin installation
Install the Incode Cordova plugin in your app using command
cordova plugin add https://github.com/Incode-Technologies-Example-Repos/incode-cordova-plugin.git
As our SDK also needs the camera to capture ID and face, use command:
cordova plugin add cordova-plugin-camera
Our SDK also uses GeoLocation, if it is required, use command:
cordova plugin add cordova-plugin-geolocation
Additional setup for iOS
- For Cordova
Open your .xcworkspace project on XCODE
Set your Team Develop in Targets > Sign & Capabilities. (if you don't have it)
Ensure that you have set up at least swift version 5: Targets > Build Settings > Swift Compiler - Language
Change your Podfile so it requires deployment target 13 or higher.
platform :ios, '13.0'
Finally:
Run "pod install" under ios folder
Troubleshooting
iOS: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation
Solution
Run the commands below:
cordova platform remove ios
cordova platform add ios
cd platforms/ios && pod install --repo-update
pod repo update
iOS:Error: Failed to fetch platform cordova-ios
using cordova platform add ios
Solution
Run the command:
npm update -g
Android: Attribute uses-permission#android.permission.WRITE_EXTERNAL_STORAGE@maxSdkVersion value=(32) from AndroidManifest.xml
Solution
add 'tools:replace="android:maxSdkVersion"' to element at AndroidManifest. Example:
<uses-permission android:maxSdkVersion="32" android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:replace="android:maxSdkVersion" />
Updated 6 months ago