SDK Integration(iOS)
Overview
- Minimum iOS version: iOS 12.0
- Supported CPU architectures: arm64
- SDK incremental package size: ~0.7M
- Use-permissions: NSCameraUsageDescription
Installation
- Add the content to your podfile.
pod 'SolutionH5', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-Solution-SDK/1.3.0/iOS-SolutionH5-V1.3.0.tar.bz2', type: :tbz
-
Quick Start
- Declare the following permissions in the info.plist
<key>NSCameraUsageDescription</key> <string>Use the camera to detect the face movements</string>
- Sets the appearance mode.
Options: LIGHT, DARK, FOLLOW_SYSTEM. Default: LIGHT.SolutionCenter.shared.setDarkThemeType(.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:Alternatively, you can be specified as an RGBA hex:SolutionCenter.shared.setThemeARGBColor(light: 0xffff0000, dark: 0xff0000ff)
SolutionCenter.shared.setThemeRGBAColor(light: 0xffff0000, dark: 0xff0000ff)
- Regist listener:
SolutionCenter.shared.register(listener: SLListener(end: { result in print("solution end: \(result.code)") print("solution end: \(String(describing: result.signatureId))") }))
- Starts the Solution flow. Pass in your own URL and a callback listener to receive the result.
SolutionCenter.shared.start(with: url)
Code
Updated 11 days ago