react-native-kalapa-ekyc 1.3.1 → 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 +35 -3
- package/ios/KalapaEkyc.m +9 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,6 +5,8 @@ Complete guide for integrating Kalapa eKYC functionality into your React Native
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Changelog
|
|
8
|
+
### 1.3.2
|
|
9
|
+
- **iOS**: Re-enable QR Code step
|
|
8
10
|
### 1.3.1
|
|
9
11
|
- **Android**: Optimize QR-code step
|
|
10
12
|
### 1.3.0
|
|
@@ -146,9 +148,38 @@ Add to your `package.json`:
|
|
|
146
148
|
|
|
147
149
|
---
|
|
148
150
|
|
|
149
|
-
##
|
|
151
|
+
## Configuration
|
|
152
|
+
### Android
|
|
153
|
+
|
|
154
|
+
#### **ProGuard / R8 (`minifyEnabled true`)**
|
|
150
155
|
|
|
151
|
-
|
|
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.**
|
|
166
|
+
|
|
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
|
|
152
183
|
|
|
153
184
|
Update your `Info.plist` with the following:
|
|
154
185
|
|
|
@@ -167,7 +198,7 @@ Update your `Info.plist` with the following:
|
|
|
167
198
|
<string>This eKYC app needs to use camera to scan document</string>
|
|
168
199
|
```
|
|
169
200
|
|
|
170
|
-
|
|
201
|
+
#### Enable NFC Capability
|
|
171
202
|
|
|
172
203
|
Add the **Near Field Communication Tag Reading** capability to your project target in Xcode.
|
|
173
204
|
|
|
@@ -603,6 +634,7 @@ const runEkyc = async (sessionId: string) => {
|
|
|
603
634
|
|
|
604
635
|
---
|
|
605
636
|
|
|
637
|
+
|
|
606
638
|
## Summary
|
|
607
639
|
|
|
608
640
|
The Kalapa eKYC React Native SDK provides identity verification with document scanning, face matching, and NFC chip reading. Key features:
|
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
|