idwise-nfc-react-native-sdk 0.0.1-alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +48 -0
- package/android/build.gradle +117 -0
- package/android/gradle.properties +7 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/idwisemobilesdk/IdwiseMobileSdkModule.kt +236 -0
- package/android/src/main/java/com/idwisemobilesdk/IdwiseMobileSdkPackage.kt +17 -0
- package/idwise-react-native-sdk.podspec +65 -0
- package/ios/IDWiseNFC.framework/Assets.car +0 -0
- package/ios/IDWiseNFC.framework/BulletCell.nib +0 -0
- package/ios/IDWiseNFC.framework/BulletCellRTL.nib +0 -0
- package/ios/IDWiseNFC.framework/DocumentCategorySelectionViewController.storyboardc/DocumentCategorySelectionViewController.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/DocumentCategorySelectionViewController.storyboardc/DocumentCategorySelectionViewController.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/DocumentCategorySelectionViewController.storyboardc/Info.plist +0 -0
- package/ios/IDWiseNFC.framework/DocumentCategorySelectionViewController.storyboardc/Y6W-OH-hqX-view-5EZ-qb-Rvc.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/DocumentCategorySelectionViewController.storyboardc/Y6W-OH-hqX-view-5EZ-qb-Rvc.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/DocumentTypeTableViewCell.nib +0 -0
- package/ios/IDWiseNFC.framework/DocumentViewController.storyboardc/HuT-DA-csJ-view-fPz-Uk-RnY.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/DocumentViewController.storyboardc/HuT-DA-csJ-view-fPz-Uk-RnY.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/DocumentViewController.storyboardc/Info.plist +0 -0
- package/ios/IDWiseNFC.framework/DocumentViewController.storyboardc/UIViewController-HuT-DA-csJ.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/DocumentViewController.storyboardc/UIViewController-HuT-DA-csJ.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/ErrorFeedbackViewController.storyboardc/ErrorFeedbackViewController.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/ErrorFeedbackViewController.storyboardc/ErrorFeedbackViewController.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/ErrorFeedbackViewController.storyboardc/Info.plist +0 -0
- package/ios/IDWiseNFC.framework/ErrorFeedbackViewController.storyboardc/eni-V6-pg3-view-IG7-Dw-aVZ.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/ErrorFeedbackViewController.storyboardc/eni-V6-pg3-view-IG7-Dw-aVZ.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/FinishJourneyViewContoller.storyboardc/Info.plist +0 -0
- package/ios/IDWiseNFC.framework/FinishJourneyViewContoller.storyboardc/UIViewController-Y6W-OH-hqX.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/FinishJourneyViewContoller.storyboardc/UIViewController-Y6W-OH-hqX.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/FinishJourneyViewContoller.storyboardc/Y6W-OH-hqX-view-5EZ-qb-Rvc.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/FinishJourneyViewContoller.storyboardc/Y6W-OH-hqX-view-5EZ-qb-Rvc.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/Headers/IDWise.h +18 -0
- package/ios/IDWiseNFC.framework/IDWiseNFC +0 -0
- package/ios/IDWiseNFC.framework/Info.plist +0 -0
- package/ios/IDWiseNFC.framework/JourneyIntroductionViewController.storyboardc/A5G-4b-J84-view-Avi-oP-H2l.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/JourneyIntroductionViewController.storyboardc/A5G-4b-J84-view-Avi-oP-H2l.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/JourneyIntroductionViewController.storyboardc/Info.plist +0 -0
- package/ios/IDWiseNFC.framework/JourneyIntroductionViewController.storyboardc/UIViewController-A5G-4b-J84.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/JourneyIntroductionViewController.storyboardc/UIViewController-A5G-4b-J84.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/MenuCell.nib +0 -0
- package/ios/IDWiseNFC.framework/MenuWidgetView.nib +0 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/arm64-apple-ios.abi.json +46777 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/arm64-apple-ios.private.swiftinterface +539 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/arm64-apple-ios.swiftinterface +539 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/x86_64-apple-ios-simulator.abi.json +46770 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +539 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +539 -0
- package/ios/IDWiseNFC.framework/Modules/IDWiseNFC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/IDWiseNFC.framework/Mulish-Bold.ttf +0 -0
- package/ios/IDWiseNFC.framework/Mulish-Light.ttf +0 -0
- package/ios/IDWiseNFC.framework/Mulish-Regular.ttf +0 -0
- package/ios/IDWiseNFC.framework/ProcessJourneyViewController.storyboardc/Info.plist +0 -0
- package/ios/IDWiseNFC.framework/ProcessJourneyViewController.storyboardc/ProcessJourneyViewController.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/ProcessJourneyViewController.storyboardc/ProcessJourneyViewController.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/ProcessJourneyViewController.storyboardc/yS7-79-T86-view-owr-v5-NaP.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/ProcessJourneyViewController.storyboardc/yS7-79-T86-view-owr-v5-NaP.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/ProgressBarMenuScreen.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/ProgressBarMenuScreen.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/ProgressBarView.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/ProgressBarView.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/RegulaSDKController.storyboardc/Info.plist +0 -0
- package/ios/IDWiseNFC.framework/RegulaSDKController.storyboardc/RegulaSDKController.nib +0 -0
- package/ios/IDWiseNFC.framework/RegulaSDKController.storyboardc/Y6W-OH-hqX-view-5EZ-qb-Rvc.nib +0 -0
- package/ios/IDWiseNFC.framework/SelfieViewController.storyboardc/Info.plist +0 -0
- package/ios/IDWiseNFC.framework/SelfieViewController.storyboardc/Od6-6k-VCn-view-avu-y3-b61.nib +0 -0
- package/ios/IDWiseNFC.framework/SelfieViewController.storyboardc/UIViewController-Od6-6k-VCn.nib +0 -0
- package/ios/IDWiseNFC.framework/StartJourneyViewController.storyboardc/Info.plist +0 -0
- package/ios/IDWiseNFC.framework/StartJourneyViewController.storyboardc/StartJourneyViewController.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/StartJourneyViewController.storyboardc/StartJourneyViewController.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/StartJourneyViewController.storyboardc/eni-V6-pg3-view-IG7-Dw-aVZ.nib/objects-13.0+.nib +0 -0
- package/ios/IDWiseNFC.framework/StartJourneyViewController.storyboardc/eni-V6-pg3-view-IG7-Dw-aVZ.nib/runtime.nib +0 -0
- package/ios/IDWiseNFC.framework/StepCell.nib +0 -0
- package/ios/IDWiseNFC.framework/document_detector.mlmodelc/analytics/coremldata.bin +0 -0
- package/ios/IDWiseNFC.framework/document_detector.mlmodelc/coremldata.bin +0 -0
- package/ios/IDWiseNFC.framework/document_detector.mlmodelc/metadata.json +115 -0
- package/ios/IDWiseNFC.framework/document_detector.mlmodelc/model0/analytics/coremldata.bin +0 -0
- package/ios/IDWiseNFC.framework/document_detector.mlmodelc/model0/coremldata.bin +0 -0
- package/ios/IDWiseNFC.framework/document_detector.mlmodelc/model0/model/coremldata.bin +0 -0
- package/ios/IDWiseNFC.framework/document_detector.mlmodelc/model0/model.espresso.net +4737 -0
- package/ios/IDWiseNFC.framework/document_detector.mlmodelc/model0/model.espresso.shape +1789 -0
- package/ios/IDWiseNFC.framework/document_detector.mlmodelc/model0/model.espresso.weights +0 -0
- package/ios/IDWiseNFC.framework/document_detector.mlmodelc/model0/neural_network_optionals/coremldata.bin +0 -0
- package/ios/IDWiseNFC.framework/document_detector.mlmodelc/model1/coremldata.bin +0 -0
- package/ios/IDWiseNFC.framework/document_quality_model.mlmodelc/analytics/coremldata.bin +0 -0
- package/ios/IDWiseNFC.framework/document_quality_model.mlmodelc/coremldata.bin +0 -0
- package/ios/IDWiseNFC.framework/document_quality_model.mlmodelc/metadata.json +79 -0
- package/ios/IDWiseNFC.framework/document_quality_model.mlmodelc/model/coremldata.bin +0 -0
- package/ios/IDWiseNFC.framework/document_quality_model.mlmodelc/model.espresso.net +2250 -0
- package/ios/IDWiseNFC.framework/document_quality_model.mlmodelc/model.espresso.shape +718 -0
- package/ios/IDWiseNFC.framework/document_quality_model.mlmodelc/model.espresso.weights +0 -0
- package/ios/IDWiseNFC.framework/document_quality_model.mlmodelc/neural_network_optionals/coremldata.bin +0 -0
- package/ios/IDWiseNFC.framework/en.lproj/Localizable.strings +0 -0
- package/ios/IDWiseNFC.framework/journey_image_config.json +96 -0
- package/ios/IDWiseNFC.framework/regula.license +0 -0
- package/ios/IdwiseMobileSdk-Bridging-Header.h +2 -0
- package/ios/IdwiseMobileSdk.mm +37 -0
- package/ios/IdwiseMobileSdk.swift +269 -0
- package/lib/commonjs/IDWise.js +74 -0
- package/lib/commonjs/IDWise.js.map +1 -0
- package/lib/commonjs/IDWiseConstants.js +26 -0
- package/lib/commonjs/IDWiseConstants.js.map +1 -0
- package/lib/commonjs/IDWiseEventListeners.js +79 -0
- package/lib/commonjs/IDWiseEventListeners.js.map +1 -0
- package/lib/commonjs/index.js +15 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/IDWise.js +68 -0
- package/lib/module/IDWise.js.map +1 -0
- package/lib/module/IDWiseConstants.js +20 -0
- package/lib/module/IDWiseConstants.js.map +1 -0
- package/lib/module/IDWiseEventListeners.js +70 -0
- package/lib/module/IDWiseEventListeners.js.map +1 -0
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -0
- package/package.json +164 -0
- package/src/IDWise.js +123 -0
- package/src/IDWiseConstants.js +23 -0
- package/src/IDWiseEventListeners.js +105 -0
- package/src/index.js +4 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 smsibtainrn
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img alt="idwise-react-native-sdk" src="https://www.idwise.com/wp-content/uploads/2022/09/IDWise-Logo.svg" width="300">
|
|
3
|
+
</p>
|
|
4
|
+
<p align="center">
|
|
5
|
+
Next-Gen Identity Verification Suite<br/>
|
|
6
|
+
<a href="https://www.idwise.com/">idwise.com</a>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
[![Version][version-badge]][package]
|
|
12
|
+
|
|
13
|
+
<p align="center"><i>IDWise React Native SDK, a package having a bridge implementation which provides an ease with the integration of IDWise Native Android and iOS SDKs.</i></p>
|
|
14
|
+
|
|
15
|
+
## Getting Started
|
|
16
|
+
|
|
17
|
+
Refer to the [getting started guide](https://docs.idwise.com/docs/integration-with-idwise) for instructions.
|
|
18
|
+
|
|
19
|
+
## Documentation
|
|
20
|
+
|
|
21
|
+
Check the sdk and their usage in our [documentation](https://docs.idwise.com/docs/react-native-documentation).
|
|
22
|
+
|
|
23
|
+
## Try it out
|
|
24
|
+
|
|
25
|
+
🧑💻 The source code for the examples are under the [/example](/example) folder.
|
|
26
|
+
|
|
27
|
+
📲 You can also try out components in our [demo apps](https://github.com/idwise/idwise-react-native-sdk-samples) available in the both stores Android and iOS.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npm install idwise-react-native-sdk
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
OR
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
yarn add idwise-react-native-sdk
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
<!-- badges -->
|
|
42
|
+
|
|
43
|
+
[version-badge]: https://img.shields.io/npm/v/idwise-react-native-sdk.svg?style=flat-square
|
|
44
|
+
[package]: https://www.npmjs.com/package/idwise-react-native-sdk
|
|
45
|
+
|
|
46
|
+
## Contributing
|
|
47
|
+
|
|
48
|
+
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
buildscript {
|
|
5
|
+
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
|
|
6
|
+
def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["IdwiseMobileSdk_kotlinVersion"]
|
|
7
|
+
|
|
8
|
+
repositories {
|
|
9
|
+
maven { url 'https://mobile-sdk.idwise.ai/releases/' }
|
|
10
|
+
google()
|
|
11
|
+
mavenCentral()
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
dependencies {
|
|
15
|
+
classpath "com.android.tools.build:gradle:7.2.1"
|
|
16
|
+
// noinspection DifferentKotlinGradleVersion
|
|
17
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/*allprojects {
|
|
22
|
+
repositories {
|
|
23
|
+
maven { url 'https://mobile-sdk.idwise.ai/releases/' }
|
|
24
|
+
google()
|
|
25
|
+
mavenCentral()
|
|
26
|
+
}
|
|
27
|
+
}*/
|
|
28
|
+
|
|
29
|
+
def isNewArchitectureEnabled() {
|
|
30
|
+
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
apply plugin: "com.android.library"
|
|
34
|
+
apply plugin: "kotlin-android"
|
|
35
|
+
|
|
36
|
+
if (isNewArchitectureEnabled()) {
|
|
37
|
+
apply plugin: "com.facebook.react"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
def getExtOrDefault(name) {
|
|
41
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["IdwiseMobileSdk_" + name]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
def getExtOrIntegerDefault(name) {
|
|
45
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["IdwiseMobileSdk_" + name]).toInteger()
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
def supportsNamespace() {
|
|
49
|
+
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
|
|
50
|
+
def major = parsed[0].toInteger()
|
|
51
|
+
def minor = parsed[1].toInteger()
|
|
52
|
+
|
|
53
|
+
// Namespace support was added in 7.3.0
|
|
54
|
+
return (major == 7 && minor >= 3) || major >= 8
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
android {
|
|
58
|
+
if (supportsNamespace()) {
|
|
59
|
+
namespace "com.idwisemobilesdk"
|
|
60
|
+
|
|
61
|
+
sourceSets {
|
|
62
|
+
main {
|
|
63
|
+
manifest.srcFile "src/main/AndroidManifestNew.xml"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
|
|
69
|
+
|
|
70
|
+
defaultConfig {
|
|
71
|
+
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
|
72
|
+
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
73
|
+
multiDexEnabled true
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
buildTypes {
|
|
77
|
+
release {
|
|
78
|
+
minifyEnabled false
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
buildFeatures {
|
|
82
|
+
dataBinding true
|
|
83
|
+
}
|
|
84
|
+
lintOptions {
|
|
85
|
+
disable "GradleCompatible"
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
compileOptions {
|
|
89
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
90
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
repositories {
|
|
95
|
+
mavenCentral()
|
|
96
|
+
google()
|
|
97
|
+
maven{
|
|
98
|
+
name 'Staging'
|
|
99
|
+
url 'https://s01.oss.sonatype.org/content/repositories/staging/'
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
104
|
+
def idwise_sdk_version =project.properties["idwise_sdk_version"]
|
|
105
|
+
|
|
106
|
+
dependencies {
|
|
107
|
+
// For < 0.71, this will be from the local maven repo
|
|
108
|
+
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
109
|
+
//noinspection GradleDynamicVersion
|
|
110
|
+
implementation "com.facebook.react:react-native:+"
|
|
111
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
112
|
+
implementation 'com.google.code.gson:gson:2.10.1'
|
|
113
|
+
|
|
114
|
+
implementation "com.idwise:android-sdk:$idwise_sdk_version"
|
|
115
|
+
implementation "com.idwise:nfc:4.7.3"
|
|
116
|
+
}
|
|
117
|
+
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
package com.idwisemobilesdk
|
|
2
|
+
|
|
3
|
+
import android.graphics.Bitmap
|
|
4
|
+
import android.util.Base64
|
|
5
|
+
import androidx.annotation.Nullable
|
|
6
|
+
import com.facebook.react.bridge.*
|
|
7
|
+
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
8
|
+
import com.google.gson.Gson
|
|
9
|
+
import com.idwise.sdk.IDWise
|
|
10
|
+
import com.idwise.sdk.IDWiseSDKCallback
|
|
11
|
+
import com.idwise.sdk.IDWiseSDKStepCallback
|
|
12
|
+
import com.idwise.sdk.data.models.IDWiseSDKError
|
|
13
|
+
import com.idwise.sdk.data.models.IDWiseSDKTheme
|
|
14
|
+
import com.idwise.sdk.data.models.JourneyInfo
|
|
15
|
+
import com.idwise.sdk.data.models.StepResult
|
|
16
|
+
import java.io.ByteArrayOutputStream
|
|
17
|
+
|
|
18
|
+
class IdwiseMobileSdkModule(private val reactContext: ReactApplicationContext) :
|
|
19
|
+
ReactContextBaseJavaModule(reactContext) {
|
|
20
|
+
|
|
21
|
+
override fun getName(): String {
|
|
22
|
+
return NAME
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
private fun sendEvent(eventName: String, @Nullable params: WritableMap) {
|
|
26
|
+
reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
27
|
+
.emit(eventName, params)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@ReactMethod
|
|
31
|
+
fun initialize(clientKey: String, theme: String) {
|
|
32
|
+
val idwiseTheme: IDWiseSDKTheme = try {
|
|
33
|
+
IDWiseSDKTheme.valueOf(theme!!)
|
|
34
|
+
} catch (e: Exception) {
|
|
35
|
+
IDWiseSDKTheme.SYSTEM_DEFAULT
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
IDWise.initialize(clientKey, idwiseTheme) { error ->
|
|
39
|
+
val params: WritableMap = Arguments.createMap()
|
|
40
|
+
error?.errorCode?.let { code -> params.putInt("errorCode", code) }
|
|
41
|
+
params.putString("errorMessage", error?.message)
|
|
42
|
+
sendEvent("onInitializeError", params)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@ReactMethod
|
|
47
|
+
fun startJourney(
|
|
48
|
+
journeyTemplateId: String,
|
|
49
|
+
referenceNo: String?,
|
|
50
|
+
locale: String
|
|
51
|
+
) {
|
|
52
|
+
currentActivity?.let { activity ->
|
|
53
|
+
IDWise.startJourney(activity, journeyTemplateId, referenceNo, locale, journeyCallback)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@ReactMethod
|
|
58
|
+
fun startDynamicJourney(
|
|
59
|
+
journeyTemplateId: String,
|
|
60
|
+
referenceNo: String?,
|
|
61
|
+
locale: String
|
|
62
|
+
) {
|
|
63
|
+
currentActivity?.let { activity ->
|
|
64
|
+
IDWise.startDynamicJourney(
|
|
65
|
+
activity, journeyTemplateId, referenceNo, locale,
|
|
66
|
+
journeyCallback, stepCallback
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@ReactMethod
|
|
72
|
+
fun resumeDynamicJourney(
|
|
73
|
+
journeyTemplateId: String,
|
|
74
|
+
journeyId: String,
|
|
75
|
+
locale: String
|
|
76
|
+
) {
|
|
77
|
+
currentActivity?.let { activity ->
|
|
78
|
+
IDWise.resumeDynamicJourney(
|
|
79
|
+
activity, journeyTemplateId, journeyId, locale,
|
|
80
|
+
journeyCallback, stepCallback
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@ReactMethod
|
|
86
|
+
fun resumeJourney(
|
|
87
|
+
journeyTemplateId: String,
|
|
88
|
+
journeyId: String,
|
|
89
|
+
locale: String
|
|
90
|
+
) {
|
|
91
|
+
currentActivity?.let { activity ->
|
|
92
|
+
IDWise.resumeJourney(
|
|
93
|
+
activity, journeyTemplateId, journeyId, locale,
|
|
94
|
+
journeyCallback
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@ReactMethod
|
|
100
|
+
fun startStep(stepId: String) {
|
|
101
|
+
currentActivity?.let { activity -> IDWise.startStep(activity, stepId) }
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@ReactMethod
|
|
105
|
+
fun startStepFromFileUpload(stepId: String, data: ByteArray) {
|
|
106
|
+
currentActivity?.let { activity -> IDWise.startStepFromFileUpload(activity, stepId, data) }
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@ReactMethod
|
|
110
|
+
fun finishDynamicJourney() {
|
|
111
|
+
IDWise.finishDynamicJourney()
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@ReactMethod
|
|
116
|
+
fun skipStep(stepId: String) {
|
|
117
|
+
IDWise.skipStep(stepId)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@ReactMethod
|
|
121
|
+
fun getJourneySummary() {
|
|
122
|
+
IDWise.getJourneySummary() { summary, error ->
|
|
123
|
+
val gson = Gson()
|
|
124
|
+
val argsMap = Arguments.createMap()
|
|
125
|
+
|
|
126
|
+
summary?.let {
|
|
127
|
+
argsMap.putString("summary", gson.toJson(summary))
|
|
128
|
+
sendEvent("onJourneySummary", argsMap)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
error?.let {
|
|
132
|
+
argsMap.putString("error", gson.toJson(error))
|
|
133
|
+
sendEvent("onJourneySummaryError", argsMap)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@ReactMethod
|
|
139
|
+
fun unloadSDK() {
|
|
140
|
+
UiThreadUtil.runOnUiThread { IDWise.unloadSDK() }
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@ReactMethod
|
|
144
|
+
fun addListener(eventName: String?) {
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@ReactMethod
|
|
148
|
+
fun removeListeners(count: Integer?) {
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
val journeyCallback = object : IDWiseSDKCallback {
|
|
152
|
+
override fun onJourneyStarted(journeyInfo: JourneyInfo) {
|
|
153
|
+
val params: WritableMap = Arguments.createMap()
|
|
154
|
+
params.putString("journeyId", journeyInfo.journeyId)
|
|
155
|
+
sendEvent("onJourneyStarted", params)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
override fun onJourneyResumed(journeyInfo: JourneyInfo) {
|
|
159
|
+
val params: WritableMap = Arguments.createMap()
|
|
160
|
+
params.putString("journeyId", journeyInfo.journeyId)
|
|
161
|
+
sendEvent("onJourneyResumed", params)
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
override fun onJourneyCompleted(journeyInfo: JourneyInfo, isCompleted: Boolean) {
|
|
165
|
+
val params: WritableMap = Arguments.createMap()
|
|
166
|
+
params.putString("journeyId", journeyInfo.journeyId)
|
|
167
|
+
sendEvent("onJourneyFinished", params)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
override fun onJourneyCancelled(journeyInfo: JourneyInfo?) {
|
|
171
|
+
val params: WritableMap = Arguments.createMap()
|
|
172
|
+
params.putString("journeyId", journeyInfo?.journeyId)
|
|
173
|
+
sendEvent("onJourneyCancelled", params)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
override fun onError(error: IDWiseSDKError) {
|
|
177
|
+
val params: WritableMap = Arguments.createMap()
|
|
178
|
+
params.putInt("errorCode", error.errorCode)
|
|
179
|
+
params.putString("errorMessage", error.message)
|
|
180
|
+
sendEvent("onJourneyError", params)
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
val stepCallback = object : IDWiseSDKStepCallback {
|
|
185
|
+
override fun onStepCaptured(stepId: String, bitmap: Bitmap?, croppedBitmap: Bitmap?) {
|
|
186
|
+
val bitmapString = convertImageToBase64String(croppedBitmap)
|
|
187
|
+
val params: WritableMap = Arguments.createMap()
|
|
188
|
+
params.putString("stepId", stepId)
|
|
189
|
+
params.putString("capturedImage", bitmapString)
|
|
190
|
+
sendEvent("onStepCaptured", params)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
override fun onStepResult(stepId: String, stepResult: StepResult?) {
|
|
194
|
+
val gson = Gson()
|
|
195
|
+
val argsMap = Arguments.createMap()
|
|
196
|
+
|
|
197
|
+
argsMap.putString("stepId", stepId)
|
|
198
|
+
stepResult?.let {
|
|
199
|
+
argsMap.putString("stepResult", gson.toJson(stepResult))
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
sendEvent("onStepResult", argsMap)
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
override fun onStepSkipped(stepId: String) {
|
|
206
|
+
val params: WritableMap = Arguments.createMap()
|
|
207
|
+
params.putString("stepId", stepId)
|
|
208
|
+
sendEvent("onStepSkipped", params)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
override fun onStepConfirmed(stepId: String) {
|
|
212
|
+
/**
|
|
213
|
+
* No need to implement this as for latest version it's not being required.
|
|
214
|
+
*/
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
override fun onStepCancelled(stepId: String) {
|
|
218
|
+
val params: WritableMap = Arguments.createMap()
|
|
219
|
+
params.putString("stepId", stepId)
|
|
220
|
+
sendEvent("onStepCancelled", params)
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
fun convertImageToBase64String(bitmap: Bitmap?): String {
|
|
226
|
+
if (bitmap == null || bitmap.isRecycled) return ""
|
|
227
|
+
|
|
228
|
+
val baos = ByteArrayOutputStream()
|
|
229
|
+
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos)
|
|
230
|
+
val b = baos.toByteArray()
|
|
231
|
+
return Base64.encodeToString(b, Base64.DEFAULT)
|
|
232
|
+
}
|
|
233
|
+
companion object {
|
|
234
|
+
const val NAME = "IdwiseMobileSdk"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
package com.idwisemobilesdk
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.ReactPackage
|
|
4
|
+
import com.facebook.react.bridge.NativeModule
|
|
5
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
+
import com.facebook.react.uimanager.ViewManager
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class IdwiseMobileSdkPackage : ReactPackage {
|
|
10
|
+
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
|
|
11
|
+
return listOf(IdwiseMobileSdkModule(reactContext))
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
|
15
|
+
return emptyList()
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
+
|
|
6
|
+
Pod::Spec.new do |s|
|
|
7
|
+
s.name = "idwise-react-native-sdk"
|
|
8
|
+
s.version = package["version"]
|
|
9
|
+
s.summary = package["description"]
|
|
10
|
+
s.homepage = package["homepage"]
|
|
11
|
+
s.license = package["license"]
|
|
12
|
+
s.authors = package["author"]
|
|
13
|
+
|
|
14
|
+
s.platforms = { :ios => "11.0" }
|
|
15
|
+
s.source = { :git => "https://github.com/idwise/idwise-mobile-sdk-react-native.git", :tag => "#{s.version}" }
|
|
16
|
+
|
|
17
|
+
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
|
+
s.static_framework = true
|
|
19
|
+
|
|
20
|
+
s.pod_target_xcconfig = {
|
|
21
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
22
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
23
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
24
|
+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" => "arm64",
|
|
25
|
+
"CODE_SIGNING_ALLOWED" => 'NO'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
s.dependency 'DocumentReader', '6.8.2981'
|
|
30
|
+
s.dependency 'DocumentReaderMRZRFID', '6.8.7687'
|
|
31
|
+
|
|
32
|
+
s.preserve_paths = 'ios/IDWiseNFC.framework/**/*'
|
|
33
|
+
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework IDWiseNFC' }
|
|
34
|
+
s.vendored_frameworks = 'ios/IDWiseNFC.framework'
|
|
35
|
+
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
|
|
36
|
+
|
|
37
|
+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
38
|
+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
39
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
40
|
+
install_modules_dependencies(s)
|
|
41
|
+
else
|
|
42
|
+
s.dependency "React-Core"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
46
|
+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
47
|
+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
48
|
+
s.pod_target_xcconfig = {
|
|
49
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
50
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
51
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
52
|
+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" => "arm64",
|
|
53
|
+
"CODE_SIGNING_ALLOWED" => 'NO'
|
|
54
|
+
}
|
|
55
|
+
s.dependency "React-Codegen"
|
|
56
|
+
s.dependency "RCT-Folly"
|
|
57
|
+
s.dependency "RCTRequired"
|
|
58
|
+
s.dependency "RCTTypeSafety"
|
|
59
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/ios/IDWiseNFC.framework/DocumentCategorySelectionViewController.storyboardc/Info.plist
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// IDWise_ios_sdk.h
|
|
3
|
+
// IDWise_ios_sdk
|
|
4
|
+
//
|
|
5
|
+
// Created by Hussein Alshlash on 10.04.2021.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
//! Project version number for IDWise_ios_sdk.
|
|
11
|
+
FOUNDATION_EXPORT double IDWiseVersionNumber;
|
|
12
|
+
|
|
13
|
+
//! Project version string for IDWise_ios_sdk.
|
|
14
|
+
FOUNDATION_EXPORT const unsigned char IDWiseVersionString[];
|
|
15
|
+
|
|
16
|
+
// In this header, you should import all the public headers of your framework using statements like #import <IDWise_ios_sdk/PublicHeader.h>
|
|
17
|
+
|
|
18
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|