react-native-kalapa-ekyc 1.3.0 → 1.3.2
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/README.md +38 -5
- package/android/build.gradle +1 -1
- package/ios/KalapaEkyc.m +9 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,10 @@ Complete guide for integrating Kalapa eKYC functionality into your React Native
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Changelog
|
|
8
|
-
|
|
8
|
+
### 1.3.2
|
|
9
|
+
- **iOS**: Re-enable QR Code step
|
|
10
|
+
### 1.3.1
|
|
11
|
+
- **Android**: Optimize QR-code step
|
|
9
12
|
### 1.3.0
|
|
10
13
|
- **TypeScript**: Fix default export being inferred as `any`. Spreading the native module (`...NativeModules.KalapaEkyc`) into the exported object previously erased all typing, so `KalapaEkyc.start()` and its result fell back to `any` in consumer code. The module is now declared via a `KalapaEkycModule` interface, so `start()` is fully typed and returns `Promise<KalapaEkycResponse>` (`{ kalapa_result: KalapaResult; session?: string }`) — no casting needed to access `kalapa_result` or its methods.
|
|
11
14
|
- **Android**: Update to latest version of Kalapa eKYC to use latest version of Android Camera X 1.6.1.
|
|
@@ -92,7 +95,7 @@ Complete guide for integrating Kalapa eKYC functionality into your React Native
|
|
|
92
95
|
| Android `compileSdkVersion` | 35 |
|
|
93
96
|
| Android `targetSdkVersion` | 35 |
|
|
94
97
|
| iOS Deployment Target | >= 13.0 |
|
|
95
|
-
| Kalapa Android SDK | 2.
|
|
98
|
+
| Kalapa Android SDK | 2.12.0 |
|
|
96
99
|
|
|
97
100
|
### Android
|
|
98
101
|
|
|
@@ -145,9 +148,38 @@ Add to your `package.json`:
|
|
|
145
148
|
|
|
146
149
|
---
|
|
147
150
|
|
|
148
|
-
##
|
|
151
|
+
## Configuration
|
|
152
|
+
### Android
|
|
153
|
+
|
|
154
|
+
#### **ProGuard / R8 (`minifyEnabled true`)**
|
|
155
|
+
|
|
156
|
+
If you enable code shrinking for your `release` build, add the ProGuard rules below to prevent the SDK from being obfuscated or stripped — otherwise the eKYC steps (OCR, NFC, liveness) may crash at runtime.
|
|
157
|
+
|
|
158
|
+
- `app/proguard-rules.pro`
|
|
159
|
+
```xml
|
|
160
|
+
# Retain generic signatures and exception types for reflection
|
|
161
|
+
-keepattributes Signature, InnerClasses, EnclosingMethod, Exceptions, *Annotation*
|
|
162
|
+
|
|
163
|
+
# Prevent obfuscation of Retrofit annotations and method structures
|
|
164
|
+
-keep class retrofit2.** { *; }
|
|
165
|
+
-dontwarn retrofit2.**
|
|
149
166
|
|
|
150
|
-
|
|
167
|
+
# Keep interfaces containing Retrofit HTTP annotations
|
|
168
|
+
-keepclasseswithmembers class * {
|
|
169
|
+
@retrofit2.http.* <methods>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
# Keep the platform-specific call adapters from being stripped
|
|
173
|
+
-keep class retrofit2.Platform$* { *; }
|
|
174
|
+
|
|
175
|
+
-keepclassmembers,allowobfuscation class * {
|
|
176
|
+
@com.google.gson.annotations.SerializedName <fields>;
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
### iOS
|
|
182
|
+
#### Declare Camera and NFC Permissions
|
|
151
183
|
|
|
152
184
|
Update your `Info.plist` with the following:
|
|
153
185
|
|
|
@@ -166,7 +198,7 @@ Update your `Info.plist` with the following:
|
|
|
166
198
|
<string>This eKYC app needs to use camera to scan document</string>
|
|
167
199
|
```
|
|
168
200
|
|
|
169
|
-
|
|
201
|
+
#### Enable NFC Capability
|
|
170
202
|
|
|
171
203
|
Add the **Near Field Communication Tag Reading** capability to your project target in Xcode.
|
|
172
204
|
|
|
@@ -602,6 +634,7 @@ const runEkyc = async (sessionId: string) => {
|
|
|
602
634
|
|
|
603
635
|
---
|
|
604
636
|
|
|
637
|
+
|
|
605
638
|
## Summary
|
|
606
639
|
|
|
607
640
|
The Kalapa eKYC React Native SDK provides identity verification with document scanning, face matching, and NFC chip reading. Key features:
|
package/android/build.gradle
CHANGED
package/ios/KalapaEkyc.m
CHANGED
|
@@ -32,8 +32,9 @@ RCT_EXPORT_METHOD(start:(NSString *)session
|
|
|
32
32
|
id val = data[@"allow_mrz_rescan_on_nfc_mismatch"];
|
|
33
33
|
BOOL allowMRZRescanOnNfcMismatch = [val isKindOfClass:NSNumber.class] ? [val boolValue] : NO;
|
|
34
34
|
id withConfirmScreenVal = data[@"with_confirm_screen"];
|
|
35
|
+
id withIsQRCodeScanEnabledVal = data[@"require_qr"];
|
|
35
36
|
BOOL withConfirmScreen = [withConfirmScreenVal isKindOfClass:NSNumber.class] ? [withConfirmScreenVal boolValue] : NO;
|
|
36
|
-
|
|
37
|
+
BOOL withIsQRCodeScanEnabled = [withIsQRCodeScanEnabledVal isKindOfClass:NSNumber.class] ? [withIsQRCodeScanEnabledVal boolValue] : NO;
|
|
37
38
|
KLPThemeColor *themeColor = [[[KLPThemeColor Builder]
|
|
38
39
|
withSuccessColor:successColor]
|
|
39
40
|
withFailureColor:failureColor];
|
|
@@ -58,6 +59,7 @@ RCT_EXPORT_METHOD(start:(NSString *)session
|
|
|
58
59
|
faceData:faceData
|
|
59
60
|
allowMRZRescanOnNfcMismatch:allowMRZRescanOnNfcMismatch
|
|
60
61
|
withShowConfirmScreen:withConfirmScreen
|
|
62
|
+
withIsQRCodeScanEnabled:withIsQRCodeScanEnabled
|
|
61
63
|
];
|
|
62
64
|
|
|
63
65
|
if (sessionID != nil) {
|
|
@@ -110,15 +112,17 @@ RCT_EXPORT_METHOD(start:(NSString *)session
|
|
|
110
112
|
customerLanguage:(NSString *)customerLanguage
|
|
111
113
|
faceData:(NSString *)faceData
|
|
112
114
|
allowMRZRescanOnNfcMismatch:(BOOL)allowMRZRescanOnNfcMismatch
|
|
113
|
-
withShowConfirmScreen:(BOOL)withConfirmScreen
|
|
114
|
-
|
|
115
|
+
withShowConfirmScreen:(BOOL)withConfirmScreen
|
|
116
|
+
withIsQRCodeScanEnabled:(BOOL)withIsQRCodeScanEnabled {
|
|
117
|
+
KLPConfig *config = [[[[[[[[[KLPConfig BuilderWithSession:session]
|
|
115
118
|
withBaseUrl:domain]
|
|
116
119
|
withLivenessVersion:livenessVersion]
|
|
117
120
|
withAppearance:appearance]
|
|
118
121
|
withCustomerLanguage:customerLanguage]
|
|
119
122
|
withMRZ:mrz]
|
|
120
123
|
withFaceDataBase64:faceData]
|
|
121
|
-
withShowConfirmScreen:withConfirmScreen]
|
|
124
|
+
withShowConfirmScreen:withConfirmScreen]
|
|
125
|
+
withIsQRCodeScanEnabled:withIsQRCodeScanEnabled];
|
|
122
126
|
return config;
|
|
123
127
|
}
|
|
124
128
|
|
|
@@ -179,4 +183,4 @@ RCT_EXPORT_METHOD(start:(NSString *)session
|
|
|
179
183
|
}
|
|
180
184
|
|
|
181
185
|
|
|
182
|
-
@end
|
|
186
|
+
@end
|