iOS Flutter Wrapper
iOS Flutter Wrapper
Integrate IDmission's IDentity SDK into your iOS Flutter application.
Setup
-
1
Set up the Flutter development environment based on your development and target OS.
Setting up the development environment → -
2
Install the
Cocoapods Plugin →cocoapods-user-defined-build-typesplugin. Do not use the system Ruby installation to install the plugin.
Ruby and CocoaPods installation (official guide) -
3
Verify that all Flutter dependencies are installed correctly.
ShellCopyflutter doctor -
4
Download and unzip the resources archive.
Download FlutterSDK2iOSResources → -
5
Run the following commands in your working directory to create the plugin template.
ShellCopyflutter 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 -
6
Add SDK files from the downloaded archive.
- Flutter Dart code: From
flutter_dart_code, copy the 3 dart files to thelibfolder. Overwrite if required. - Flutter Dart project code: From
flutter_dart_project_code, copymain.darttoexample/lib. Overwrite if required. - Podspec and Podfile: From
podspec, copy to theiosfolder. Frompodfile, copy toexample/ios. Overwrite if required.
-
7
Set up pods. Navigate to the
example/iosdirectory in Terminal and uninstall the existing pods.ShellCopypod deintegrateDelete
Podfile.lockandRunner.xcworkspaceinexample/ios. Replace the Podfile with the one from the archive. Then install pods.ShellCopypod install -
8
Add permissions. Copy the contents of the
permissionsfolder toexample/ios/Runner. Overwrite if required. -
9
Open the project in Xcode by launching
Runner.xcworkspaceinexample/ios. -
10
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. DeleteFlutterPluginIdentitySdkPlugin.swift. Drag and drop theios_codefolder contents into Classes. In the popup, select Copy items if needed, Create groups, and the flutter_plugin_identity_sdk target. -
11
Select the Runner target, then Build Phases → Run Script. Add the following on the second line of the shell script.
ShellCopyfind "$BUILD_DIR" -type f -name "*.signature" -exec rm {} \; -
12
Close Xcode. Navigate to
example/iosin Terminal and re-integrate pods.ShellCopypod deintegrateDelete
Podfile.lockandRunner.xcworkspaceagain, then reinstall.ShellCopypod install -
13
Relaunch
Runner.xcworkspaceinexample/ios. -
14
Navigate to Product → Scheme → Edit Scheme. Select the Run Action. Under the Info tab, set Build Configuration to Release. Uncheck the Debug Executable checkbox.
-
15
Configure code signing. Select the Runner target, then Signing & Capabilities. Add your Team and Provisioning Profile.
-
16
Build and run the code on an iOS device from Xcode.
Available Functions
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()Report a docs issue
Copy this context into your team’s issue tracker or an email to support@idmission.com.
