iOS React Wrapper
-
Setup the React Native development environment based on the development and target OS by following the steps here,
Setting up the development environment -
Download and unzip the React Native Resources archive, it consists of the react-native, ios_code_1, ios_code_2, ios_framework directories and a Podfile.
ReactNativeSDK2iOSResources -
Create an empty React Native application
npx @react-native-community/cli init IDMTest
-
Add Javascript code. Copy and paste the contents of react-native folder to the main project folder. Overwrite files if required.
-
Add React Native dependencies. In package.json change the dependencies node.
"dependencies": {
"@react-native/new-app-screen": "0.83.1",
"@react-navigation/native": "^7.1.28",
"@react-navigation/native-stack": "^7.12.0",
"@react-navigation/stack": "^7.7.1",
"native-base": "^3.4.28",
"react": "19.2.0",
"react-dom": "^19.2.0",
"react-native": "0.83.1",
"react-native-gesture-handler": "^1.9.0",
"react-native-safe-area-context": "^5.6.2",
"react-native-screens": "^4.23.0",
"react-native-svg": "^15.15.3"
},
- Delete node_modules folder. Build React Native application
npm install
- Setup pods. Navigate to the iOS directory. Uninstall pods.
pod deintegrate
- Delete Podfile.lock and IDMTest.xcworkspace files. Replace the Podfile with the Podfile from ReactNativeSDK2iOSResources archive. Install pods.
pod install
- Add iOS code. Copy and paste the AppDelegate.m file from ios_code_1 folder in IDMTest folder inside the ios folder. Overwrite files if required. Please check the permissions mentioned in the Info.plist file. Please add the permissions which are not present in your project’s Info.plist file.
- Launch IDMTest.xcworkspace.
- In the ios_code_2 folder, please rename YourProjectName-Bridging-Header.h file based on your project’s name. Drag and drop all the files in the ios_code_2 folder in IDMTest in XCode. In the popup “Copy items if needed”, “Create groups” and “IDMTest” target should be selected. Select Create Bridging Header in the popup that opens after this.
- Add iOS dependencies. Drag and drop the IDCapture_Swift.xcframework, IDentitySDK_Swift.xcframework, SelfieCapture_Swift.xcframework,IDentityModels.xcframework present in the ios_framework directory into the Frameworks directory in XCode. In the popup, “Copy items if needed”, “Create groups” and “IDMTest” target should be selected. Select the Target, then select General, Framework, Libraries and Embedded Content, and select the Embed & Sign option for IDCapture_Swift.xcframework, IDentitySDK_Swift.xcframework, SelfieCapture_Swift.xcframework,IDentityModels.xcframework.
- Code signing. Select the Target, then select Signing & Capabilities. Add Team and Provisioning Profile
- Build and run the application from XCode.
- Initialize - Initializes the SDK.
- ID Validation - Initiates ID Validation(Service ID 20) flow.
- ID Validation and Match Face - Initiates ID Validation and Match Face(Service ID 10) flow.
- Identify Customer - Initiates Identify Customer(Service ID 185) flow.
- Live Face Check - Initiates Live Face Check(Service ID 660) flow.
- ID Validation and Customer Enroll - Initiates ID Validation and Customer Enroll(Service ID 50) flow.
- Customer Enroll Biometrics - Initiates Customer Enroll Biometrics(Service ID 175) flow.
- Customer Verification - Initiates Customer Verification(Service ID 105) flow.
- Submit Result - Submits the form.
Available Functions
IDMissionSDK.initializeSDK(String apiBaseUrl, String authUrl, String debug, String accessToken)
IDMissionSDK.serviceID20()
IDMissionSDK.serviceID10()
IDMissionSDK.serviceID185()
IDMissionSDK.serviceID660()
IDMissionSDK.serviceID50(String uniqueCustomerNumber)
IDMissionSDK.serviceID175(String uniqueCustomerNumber)
IDMissionSDK.serviceID105(String uniqueCustomerNumber)
IDMissionSDK.submitResult()