SDK Integration(React Native)
Overview
Android
- Minimum Android version:
4.4 (API Level:19) - Compilation Android SDK version:
API Level:35 - Supported CPU architectures:
armeabi-v7a,arm64-v8a - SDK incremental package size:
~0.9MB
iOS
- Minimum iOS version:
iOS 12.0 - Supported CPU architectures:
arm64 - SDK incremental package size:
~0.7M - Use-permissions:
NSCameraUsageDescription
Installation
You can use the npm install command to install, or manually configure in the package.json file.
run npm install command:
npm install solution-plugin
or manually configure:
"dependencies": {
"solution-plugin": "1.4.1"
},
iOS
- Declare the following permissions in the info.plist
<key>NSCameraUsageDescription</key> <string>Use the camera to detect the face movements</string> - Add the content to your podfile.
pod 'SolutionH5', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-Solution-SDK/1.4.0/iOS-SolutionH5-V1.4.0.tar.bz2', type: :tbz pod 'AAIDataVisorSDK', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-AAIDataVisor-SDK/0.1.6/iOS-AAIDataVisorSDK-V0.1.6.tar.bz2', type: :tbz pod 'AAICore', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-libraries/AAICore/1.0.1/AAICore-V1.0.1.tar.bz2', type: :tbz
Quick Start
- Import the necessary APIs.
import { getSDKVersion, setThemeARGBColor, setDarkThemeType, start, type EndResult, ThemeType, } from 'solution-plugin'; - Sets the appearance mode.
Options: LIGHT, DARK, FOLLOW_SYSTEM.
Default: LIGHT.
setDarkThemeType(ThemeType.FOLLOW_SYSTEM); - Sets the loading color of the page for both light and dark appearance modes.The provided color value must be in ARGB or RGB format.
This can be specified as an ARGB hex string:
setThemeARGBColor('#FF000000', '#FFFFFFFF'); - Starts the Solution flow. Call the start method, pass a url parameter, and receive an asynchronous return value.
For detailed return values, please consult the [documentation link].const result = (await start('Your own url',)) as EndResult; console.log('Solution result:', result);
Updated 7 days ago
