Documentation

SDK Integration(iOS)

Overview

  • Minimum iOS version: iOS 12.0
  • Supported CPU architectures: arm64
  • SDK incremental package size: ~0.7M
  • Use-permissions: NSCameraUsageDescription

Installation

  1. 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
  2. Quick Start

  3. Declare the following permissions in the info.plist
    <key>NSCameraUsageDescription</key>  
    <string>Use the camera to detect the face movements</string>

  1. Sets the appearance mode.
    Options: LIGHT, DARK, FOLLOW_SYSTEM. Default: LIGHT.
    SolutionCenter.shared.setDarkThemeType(.FOLLOW_SYSTEM)
  2. 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:
    SolutionCenter.shared.setThemeARGBColor(light: 0xffff0000, dark: 0xff0000ff)
    Alternatively, you can be specified as an RGBA hex:
    SolutionCenter.shared.setThemeRGBAColor(light: 0xffff0000, dark: 0xff0000ff)
  3. Regist listener:
    SolutionCenter.shared.register(listener: SLListener(end: { result in
                print("solution end: \(result.code)")
                print("solution end: \(String(describing: result.signatureId))")
            }))
  4. Starts the Solution flow. Pass in your own URL and a callback listener to receive the result.
    SolutionCenter.shared.start(with: url)

Code

Result Code