Integrate IDmission's IDentity SDK into your iOS Flutter application.
Set up the Flutter development environment based on your development and target OS.
Setting up the development environment →Install the cocoapods-user-defined-build-types plugin. Do not use the system Ruby installation to install the plugin.
Verify that all Flutter dependencies are installed correctly.
flutter doctor
Download and unzip the resources archive.
Download FlutterSDK2iOSResources →Run the following commands in your working directory to create the plugin template.
flutter create --template=plugin --org com.idmission.newsdkflutter --platforms=android,ios -a java -i swift flutter_plugin_identity_sdk
cd flutter_plugin_identity_sdk
cd example
flutter pub upgrade
dart migrate --apply-changes
Add SDK files from the downloaded archive.
flutter_dart_code, copy the 3 dart files to the lib folder. Overwrite if required.flutter_dart_project_code, copy main.dart to example/lib. Overwrite if required.podspec, copy to the ios folder. From podfile, copy to example/ios. Overwrite if required.Set up pods. Navigate to the example/ios directory in Terminal and uninstall the existing pods.
pod deintegrate
Delete Podfile.lock and Runner.xcworkspace in example/ios. Replace the Podfile with the one from the archive. Then install pods.
pod install
Add permissions. Copy the contents of the permissions folder to example/ios/Runner. Overwrite if required.
Open the project in Xcode by launching Runner.xcworkspace in example/ios.
Add iOS code. In the Xcode project navigator, go to Pods/Development Pods/flutter_plugin_identity_sdk/.../../example/ios/.symlinks/plugins/flutter_plugin_identity_sdk/ios/Classes. Delete FlutterPluginIdentitySdkPlugin.swift. Drag and drop the ios_code folder contents into Classes. In the popup, select Copy items if needed, Create groups, and the flutter_plugin_identity_sdk target.
Select the Runner target, then Build Phases → Run Script. Add the following on the second line of the shell script.
find "$BUILD_DIR" -type f -name "*.signature" -exec rm {} \;
Close Xcode. Navigate to example/ios in Terminal and re-integrate pods.
pod deintegrate
Delete Podfile.lock and Runner.xcworkspace again, then reinstall.
pod install
Relaunch Runner.xcworkspace in example/ios.
Navigate to Product → Scheme → Edit Scheme. Select the Run Action. Under the Info tab, set Build Configuration to Release. Uncheck the Debug Executable checkbox.
Configure code signing. Select the Runner target, then Signing & Capabilities. Add your Team and Provisioning Profile.
Build and run the code on an iOS device from Xcode.
The following functions are available after initializing the SDK.
Initializes the SDK. Must be called before any other function.
idm_sdk_init(String apiBaseUrl, String debug, String accessToken)Initiates the ID Validation (Service ID 20) flow.
idm_sdk_serviceID20()Initiates the ID Validation and Match Face (Service ID 10) flow.
idm_sdk_serviceID10()Initiates the Identify Customer (Service ID 185) flow.
idm_sdk_serviceID185()Initiates the Live Face Check (Service ID 660) flow.
idm_sdk_serviceID660()Initiates the ID Validation and Customer Enroll (Service ID 50) flow.
idm_sdk_serviceID50(int uniqueCustomerNumber)Initiates the Customer Enroll Biometrics (Service ID 175) flow.
idm_sdk_serviceID175(int uniqueCustomerNumber)Initiates the Customer Verification (Service ID 105) flow.
idm_sdk_serviceID105(int uniqueCustomerNumber)Submits the form and finalizes the current service flow.
submit_result()