@soyio/soyio-rn-sdk 5.0.0-dev → 6.0.0
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 +28 -112
- package/package/src/bridges/facetec.js +16 -8
- package/package/src/bridges/facetec.js.map +1 -1
- package/package.json +9 -7
- package/android/build.gradle +0 -57
- package/android/libs/facetec-sdk-9.7.114.aar +0 -0
- package/android/src/main/AndroidManifest.xml +0 -8
- package/android/src/main/java/com/soyio/soyiorndk/AndroidFacetecSdkModule.kt +0 -224
- package/android/src/main/java/com/soyio/soyiorndk/AndroidFacetecSdkPackage.kt +0 -16
- package/android/src/main/java/com/soyio/soyiorndk/ApiDate.kt +0 -5
- package/android/src/main/java/com/soyio/soyiorndk/BaseFaceTecProcessor.kt +0 -75
- package/android/src/main/java/com/soyio/soyiorndk/FaceTecRequestService.kt +0 -115
- package/android/src/main/java/com/soyio/soyiorndk/FacetecConfig.kt +0 -311
- package/android/src/main/java/com/soyio/soyiorndk/SoyioIdOnlyProcessor.kt +0 -81
- package/android/src/main/java/com/soyio/soyiorndk/SoyioValidationProcessor.kt +0 -136
- package/android/src/main/res/drawable-nodpi/soyio_facetec_close.png +0 -0
- package/android/src/main/res/drawable-nodpi/soyio_facetec_id_front.png +0 -0
- package/android/src/main/res/values/strings.xml +0 -134
- package/assets/adaptive-icon.png +0 -0
- package/assets/favicon.png +0 -0
- package/assets/fonts/RobotoFlex.ttf +0 -0
- package/assets/icon.png +0 -0
- package/assets/images/SoyioRnSdk.xcassets/facetec-close.imageset/Contents.json +0 -23
- package/assets/images/SoyioRnSdk.xcassets/facetec-close.imageset/facetec-close@1x.png +0 -0
- package/assets/images/SoyioRnSdk.xcassets/facetec-close.imageset/facetec-close@2x.png +0 -0
- package/assets/images/SoyioRnSdk.xcassets/facetec-close.imageset/facetec-close@3x.png +0 -0
- package/assets/images/SoyioRnSdk.xcassets/facetec-id-front.imageset/Contents.json +0 -23
- package/assets/images/SoyioRnSdk.xcassets/facetec-id-front.imageset/facetec-id-front@1x.png +0 -0
- package/assets/images/SoyioRnSdk.xcassets/facetec-id-front.imageset/facetec-id-front@2x.png +0 -0
- package/assets/images/SoyioRnSdk.xcassets/facetec-id-front.imageset/facetec-id-front@3x.png +0 -0
- package/assets/splash.png +0 -0
- package/ios/ApiDate.swift +0 -5
- package/ios/FacetecConfig.swift +0 -217
- package/ios/FacetecStrings.swift +0 -139
- package/ios/Frameworks/FaceTecSDK.xcframework/Info.plist +0 -44
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Assets.car +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/FaceTecSDK +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/GenericGuidanceContentLayout.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Headers/FaceTecPublicApi.h +0 -1935
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Headers/FaceTecPublicStringKeys.h +0 -109
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Headers/FaceTecSDK.h +0 -16
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Info.plist +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Modules/module.modulemap +0 -6
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/PrivacyInfo.xcprivacy +0 -29
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/ReadyScreenGuidanceContentLayout.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/RetryScreenGuidanceContentLayout.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/SharedGuidanceLayout.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/9Uo-4b-JiE-view-Ae0-rb-UqS.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/CJ6-MX-bJp-view-8JL-Rc-0g1.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/FaceScanViewController.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/FaceTecAdditionalReviewViewController.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/FaceTecIDFeedbackViewController.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/FaceTecOCRConfirmationViewController.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/IDCaptureViewController.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/IDSelectionViewController.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/Info.plist +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/Pyw-6G-JSY-view-Zue-Eo-Q2U.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/QWA-8Y-vUM-view-wJB-Z5-eD2.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/alz-Ia-X3d-view-IKu-EI-Hug.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/Storyboard.storyboardc/l2Q-cc-kD8-view-UUy-6c-meu.nib +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/_CodeSignature/CodeResources +0 -729
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/af.lproj/FaceTec.strings +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/ar.lproj/FaceTec.strings +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/attributions.txt +0 -462
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/1f5b84f51ce0fcfbb76e904b7bcaa7560f601e1394a0b29367a09385312287eb +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/2b075ac1a6132b5b8a4c9ef0ba6b0cd84db7838aca9a000e50d907f40770a4ab +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/59cc2a9af81aaca2376702c2490650f4da2775fa673274db98aad41b7ef101c0 +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/5b63e98b991aedabb60665503384f30bffd939decf9433883b30b78011ee501a +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/66388dc76dc16bc6b76b682edd218a575bf45b9b +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/6b3133f0f39ff89a2a169d61176ee17cafacc5e288f334e2b64ee82892d11ccd +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/9077d16225f9314163ef1e7db6fc7d4088bb903d134bd95f23d5591ca4dfbfca +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/a74f2afb9d20f2375ccbd14e67c094b85c89ceb608f7cf8ae04f3f646a6c5672 +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/b501893e75f62ee1707643e35b21109927b07ed5b202321c961b424cbc2e4695 +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/dbd7a353f0130bb983d6ba05917e9be991d70e8f028df4b74e30bc6497ef7f71 +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/f2.xml +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/fd6d368a5658496536e2bfae170d1b823a3629b242cafc09784bfba4e56d8c80 +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/marker +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/vu0ilin6we3lrzo5f83f7qs2jul4aq7v4aoynrmch8zfvpi8ezrfyafa4t0fx87l +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/de.lproj/FaceTec.strings +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/el.lproj/FaceTec.strings +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/en.lproj/FaceTec.strings +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/es.lproj/FaceTec.strings +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/fr.lproj/FaceTec.strings +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/kk.lproj/FaceTec.strings +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/nb.lproj/FaceTec.strings +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/pt-BR.lproj/FaceTec.strings +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/ru.lproj/FaceTec.strings +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/strip-unused-architectures-from-target.sh +0 -62
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64_x86_64-simulator/FaceTecSDK.framework/FaceTecSDK +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecPublicApi.h +0 -1935
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecPublicStringKeys.h +0 -109
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecSDK.h +0 -16
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64_x86_64-simulator/FaceTecSDK.framework/Info.plist +0 -0
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64_x86_64-simulator/FaceTecSDK.framework/Modules/module.modulemap +0 -6
- package/ios/Frameworks/FaceTecSDK.xcframework/ios-arm64_x86_64-simulator/FaceTecSDK.framework/_CodeSignature/CodeResources +0 -146
- package/ios/IOSFacetecSdk.m +0 -22
- package/ios/IOSFacetecSdk.swift +0 -221
- package/ios/ProcessorProtocol.swift +0 -6
- package/ios/SoyioIDOnlyProcessor.swift +0 -170
- package/ios/SoyioPhotoIDMatchProcessor.swift +0 -264
- package/package/package.json +0 -68
- package/react-native.config.js +0 -12
- package/scripts/prepare-facetec-xcframework.sh +0 -38
- package/soyio_rn_sdk.podspec +0 -52
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
package com.soyio.soyiorndk
|
|
2
|
-
|
|
3
|
-
import android.app.Activity
|
|
4
|
-
import com.facebook.react.bridge.Promise
|
|
5
|
-
import com.facetec.sdk.FaceTecFaceScanProcessor
|
|
6
|
-
import com.facetec.sdk.FaceTecFaceScanResultCallback
|
|
7
|
-
import com.facetec.sdk.FaceTecIDScanProcessor
|
|
8
|
-
import com.facetec.sdk.FaceTecIDScanResult
|
|
9
|
-
import com.facetec.sdk.FaceTecIDScanResultCallback
|
|
10
|
-
import com.facetec.sdk.FaceTecIDScanStatus
|
|
11
|
-
import com.facetec.sdk.FaceTecSessionActivity
|
|
12
|
-
import com.facetec.sdk.FaceTecCustomization
|
|
13
|
-
import com.facetec.sdk.FaceTecSessionResult
|
|
14
|
-
import com.facetec.sdk.FaceTecSessionStatus
|
|
15
|
-
import org.json.JSONObject
|
|
16
|
-
|
|
17
|
-
class SoyioValidationProcessor(
|
|
18
|
-
activity: Activity,
|
|
19
|
-
sessionToken: String,
|
|
20
|
-
baseUrl: String,
|
|
21
|
-
resourcePath: String,
|
|
22
|
-
requestableToken: String,
|
|
23
|
-
authToken: String,
|
|
24
|
-
promise: Promise,
|
|
25
|
-
private val onLivenessSuccess: (() -> Unit)? = null,
|
|
26
|
-
) : BaseFaceTecProcessor(promise, FACETEC_VALIDATION_ERROR, activity), FaceTecFaceScanProcessor, FaceTecIDScanProcessor {
|
|
27
|
-
|
|
28
|
-
private val requestService = FaceTecRequestService(
|
|
29
|
-
baseUrl = baseUrl,
|
|
30
|
-
resourcePath = resourcePath,
|
|
31
|
-
requestableToken = requestableToken,
|
|
32
|
-
authToken = authToken,
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
init {
|
|
36
|
-
FaceTecSessionActivity.createAndLaunchSession(
|
|
37
|
-
activity,
|
|
38
|
-
this,
|
|
39
|
-
this,
|
|
40
|
-
sessionToken,
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
override fun processSessionWhileFaceTecSDKWaits(
|
|
45
|
-
sessionResult: FaceTecSessionResult,
|
|
46
|
-
faceScanResultCallback: FaceTecFaceScanResultCallback,
|
|
47
|
-
) {
|
|
48
|
-
if (sessionResult.status != FaceTecSessionStatus.SESSION_COMPLETED_SUCCESSFULLY) {
|
|
49
|
-
faceScanResultCallback.cancel()
|
|
50
|
-
markFailure(flowCancelledError)
|
|
51
|
-
return
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
val payload = JSONObject().apply {
|
|
55
|
-
put("face_scan", sessionResult.faceScanBase64)
|
|
56
|
-
put("audit_trail_image", sessionResult.auditTrailCompressedBase64?.getOrNull(0) ?: "")
|
|
57
|
-
put("low_quality_audit_trail_image", sessionResult.lowQualityAuditTrailCompressedBase64?.getOrNull(0) ?: "")
|
|
58
|
-
put("session_id", sessionResult.sessionId ?: "")
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
requestService.post(
|
|
62
|
-
endpoint = "liveness_check",
|
|
63
|
-
payload = payload,
|
|
64
|
-
sessionId = sessionResult.sessionId,
|
|
65
|
-
progress = { progress -> faceScanResultCallback.uploadProgress(progress) },
|
|
66
|
-
onSuccess = { json ->
|
|
67
|
-
val error = json.optBoolean("error")
|
|
68
|
-
val wasProcessed = json.optBoolean("wasProcessed")
|
|
69
|
-
val errorMessage = json.optString("errorMessage")
|
|
70
|
-
val scanResultBlob = json.optString("scanResultBlob")
|
|
71
|
-
|
|
72
|
-
if (error || !wasProcessed || scanResultBlob.isNullOrBlank()) {
|
|
73
|
-
faceScanResultCallback.cancel()
|
|
74
|
-
markFailure(errorMessage.takeIf { it.isNotBlank() } ?: defaultError)
|
|
75
|
-
return@post
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
FaceTecCustomization.overrideResultScreenSuccessMessage = "¡Te ves bien!\nSelfie verificada\ncorrectamente"
|
|
79
|
-
faceScanResultCallback.proceedToNextStep(scanResultBlob)
|
|
80
|
-
onLivenessSuccess?.invoke()
|
|
81
|
-
},
|
|
82
|
-
onFailure = {
|
|
83
|
-
faceScanResultCallback.cancel()
|
|
84
|
-
markFailure(it.ifBlank { defaultError })
|
|
85
|
-
},
|
|
86
|
-
)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
override fun processIDScanWhileFaceTecSDKWaits(
|
|
90
|
-
idScanResult: FaceTecIDScanResult,
|
|
91
|
-
idScanResultCallback: FaceTecIDScanResultCallback,
|
|
92
|
-
) {
|
|
93
|
-
if (idScanResult.status != FaceTecIDScanStatus.SUCCESS) {
|
|
94
|
-
idScanResultCallback.cancel()
|
|
95
|
-
markFailure(flowCancelledError)
|
|
96
|
-
return
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
val payload = JSONObject().apply {
|
|
100
|
-
put("id_scan", idScanResult.idScanBase64)
|
|
101
|
-
put("session_id", idScanResult.sessionId ?: "")
|
|
102
|
-
put("id_scan_front_image", idScanResult.frontImagesCompressedBase64?.getOrNull(0) ?: "")
|
|
103
|
-
put("id_scan_back_image", idScanResult.backImagesCompressedBase64?.getOrNull(0) ?: "")
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
requestService.post(
|
|
107
|
-
endpoint = "id_check",
|
|
108
|
-
payload = payload,
|
|
109
|
-
sessionId = idScanResult.sessionId,
|
|
110
|
-
progress = { progress -> idScanResultCallback.uploadProgress(progress) },
|
|
111
|
-
onSuccess = { json ->
|
|
112
|
-
val error = json.optBoolean("error")
|
|
113
|
-
val wasProcessed = json.optBoolean("wasProcessed")
|
|
114
|
-
val errorMessage = json.optString("errorMessage")
|
|
115
|
-
val scanResultBlob = json.optString("scanResultBlob")
|
|
116
|
-
|
|
117
|
-
if (error || !wasProcessed || scanResultBlob.isNullOrBlank()) {
|
|
118
|
-
idScanResultCallback.cancel()
|
|
119
|
-
markFailure(errorMessage.takeIf { it.isNotBlank() } ?: defaultError)
|
|
120
|
-
return@post
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
idScanResultCallback.proceedToNextStep(scanResultBlob)
|
|
124
|
-
markSuccess()
|
|
125
|
-
},
|
|
126
|
-
onFailure = {
|
|
127
|
-
idScanResultCallback.cancel()
|
|
128
|
-
markFailure(it.ifBlank { defaultError })
|
|
129
|
-
},
|
|
130
|
-
)
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
companion object {
|
|
134
|
-
private const val FACETEC_VALIDATION_ERROR = "FACETEC_VALIDATION_ERROR"
|
|
135
|
-
}
|
|
136
|
-
}
|
|
Binary file
|
|
Binary file
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
<resources xmlns:tools="http://schemas.android.com/tools">
|
|
2
|
-
<!-- Actions -->
|
|
3
|
-
<string name="soyio_facetec_action_ok">Aceptar</string>
|
|
4
|
-
<string name="soyio_facetec_action_im_ready">Comenzar validación</string>
|
|
5
|
-
<string name="soyio_facetec_action_try_again">Volver a intentarlo</string>
|
|
6
|
-
<string name="soyio_facetec_action_continue">Continuar</string>
|
|
7
|
-
<string name="soyio_facetec_action_take_photo">Tomar foto</string>
|
|
8
|
-
<string name="soyio_facetec_action_accept_photo">Aceptar</string>
|
|
9
|
-
<string name="soyio_facetec_action_retake_photo">Volver</string>
|
|
10
|
-
<string name="soyio_facetec_action_confirm">Confirmar información</string>
|
|
11
|
-
<string name="soyio_facetec_action_scan_nfc">Escanear NFC</string>
|
|
12
|
-
<string name="soyio_facetec_action_scan_nfc_card">Escanear chip</string>
|
|
13
|
-
<string name="soyio_facetec_action_skip_nfc">Omitir este paso</string>
|
|
14
|
-
|
|
15
|
-
<!-- Accessibility -->
|
|
16
|
-
<string name="soyio_facetec_accessibility_cancel_button">Cancelar</string>
|
|
17
|
-
<string name="soyio_facetec_accessibility_torch_button">Interruptor de iluminación</string>
|
|
18
|
-
<string name="soyio_facetec_accessibility_tap_guidance">Toca dos veces cualquier parte de la pantalla para ver indicaciones sobre cómo alinear tu rostro.</string>
|
|
19
|
-
<string name="soyio_facetec_accessibility_feedback_move_phone_away">Tu rostro está demasiado cerca</string>
|
|
20
|
-
<string name="soyio_facetec_accessibility_feedback_move_phone_closer">Tu rostro está demasiado lejos</string>
|
|
21
|
-
<string name="soyio_facetec_accessibility_feedback_face_too_far_left">Tu rostro está demasiado a la izquierda</string>
|
|
22
|
-
<string name="soyio_facetec_accessibility_feedback_face_too_far_right">Tu rostro está demasiado a la derecha</string>
|
|
23
|
-
<string name="soyio_facetec_accessibility_feedback_face_too_low">Tu rostro está demasiado abajo</string>
|
|
24
|
-
<string name="soyio_facetec_accessibility_feedback_face_too_high">Tu rostro está demasiado arriba</string>
|
|
25
|
-
<string name="soyio_facetec_accessibility_feedback_face_rotated_too_far_left">Tu rostro gira demasiado a la izquierda</string>
|
|
26
|
-
<string name="soyio_facetec_accessibility_feedback_face_rotated_too_far_right">Tu rostro gira demasiado a la derecha</string>
|
|
27
|
-
<string name="soyio_facetec_accessibility_feedback_face_pointing_too_far_left">Tu rostro está demasiado inclinado hacia la izquierda</string>
|
|
28
|
-
<string name="soyio_facetec_accessibility_feedback_face_pointing_too_far_right">Tu rostro está demasiado inclinado hacia la derecha</string>
|
|
29
|
-
<string name="soyio_facetec_accessibility_feedback_face_not_on_camera">El rostro no se ve en la cámara o está demasiado lejos</string>
|
|
30
|
-
<string name="soyio_facetec_accessibility_feedback_hold_device_to_eye_level">Mantén el dispositivo a la altura de los ojos</string>
|
|
31
|
-
|
|
32
|
-
<!-- Presession -->
|
|
33
|
-
<string name="soyio_facetec_presession_frame_your_face">Encuadra tu rostro en el óvalo</string>
|
|
34
|
-
<string name="soyio_facetec_presession_position_face_straight_in_oval">Mira hacia el frente</string>
|
|
35
|
-
<string name="soyio_facetec_presession_hold_steady_3">Mantente quieto durante: 3</string>
|
|
36
|
-
<string name="soyio_facetec_presession_hold_steady_2">Mantente quieto durante: 2</string>
|
|
37
|
-
<string name="soyio_facetec_presession_hold_steady_1">Mantente quieto durante: 1</string>
|
|
38
|
-
<string name="soyio_facetec_presession_remove_dark_glasses">Quítate los lentes oscuros</string>
|
|
39
|
-
<string name="soyio_facetec_presession_neutral_expression">Expresión neutra, sin sonreír</string>
|
|
40
|
-
<string name="soyio_facetec_presession_conditions_too_bright">Demasiada luz</string>
|
|
41
|
-
<string name="soyio_facetec_presession_brighten_your_environment">Ilumina tu entorno</string>
|
|
42
|
-
|
|
43
|
-
<!-- Feedback -->
|
|
44
|
-
<string name="soyio_facetec_feedback_center_face">Centra tu rostro</string>
|
|
45
|
-
<string name="soyio_facetec_feedback_face_not_found">Encuadra tu rostro</string>
|
|
46
|
-
<string name="soyio_facetec_feedback_move_phone_away">Aléjate</string>
|
|
47
|
-
<string name="soyio_facetec_feedback_move_phone_closer">Acércate</string>
|
|
48
|
-
<string name="soyio_facetec_feedback_move_phone_to_eye_level">Coloca la cámara a la altura de los ojos</string>
|
|
49
|
-
<string name="soyio_facetec_feedback_face_not_looking_straight_ahead">Mira hacia el frente</string>
|
|
50
|
-
<string name="soyio_facetec_feedback_face_not_upright">Mantén la cabeza recta</string>
|
|
51
|
-
<string name="soyio_facetec_feedback_hold_steady">Quédate quieto</string>
|
|
52
|
-
<string name="soyio_facetec_feedback_use_even_lighting">Ilumina el rostro de forma más uniforme</string>
|
|
53
|
-
|
|
54
|
-
<!-- Instructions -->
|
|
55
|
-
<string name="soyio_facetec_instructions_header_ready_1"></string>
|
|
56
|
-
<string name="soyio_facetec_instructions_header_ready_2">Prepárate para la selfie</string>
|
|
57
|
-
<string name="soyio_facetec_instructions_message_ready_1">Alinea tu rostro dentro del óvalo</string>
|
|
58
|
-
<string name="soyio_facetec_instructions_message_ready_2"></string>
|
|
59
|
-
|
|
60
|
-
<!-- Retry -->
|
|
61
|
-
<string name="soyio_facetec_retry_header">Intentémoslo otra vez</string>
|
|
62
|
-
<string name="soyio_facetec_retry_subheader_message">Necesitamos una selfie más nítida</string>
|
|
63
|
-
<string name="soyio_facetec_retry_your_image_label">Tu selfie</string>
|
|
64
|
-
<string name="soyio_facetec_retry_ideal_image_label">Pose ideal</string>
|
|
65
|
-
<string name="soyio_facetec_retry_instruction_message_1">Usa una pose y iluminación ideal</string>
|
|
66
|
-
<string name="soyio_facetec_retry_instruction_message_2">Expresión neutra, sin sonreír</string>
|
|
67
|
-
<string name="soyio_facetec_retry_instruction_message_3">Demasiado borrosa, limpie la cámara</string>
|
|
68
|
-
|
|
69
|
-
<!-- Camera Permission -->
|
|
70
|
-
<string name="soyio_facetec_camera_permission_header">Habilita la cámara</string>
|
|
71
|
-
<string name="soyio_facetec_camera_permission_message_enroll">Permisos de cámara deshabilitados.\nVerifique la configuración de tu sistema operativo</string>
|
|
72
|
-
<string name="soyio_facetec_camera_permission_message_auth">Permisos de cámara deshabilitados.\nVerifique la configuración de tu sistema operativo</string>
|
|
73
|
-
<string name="soyio_facetec_camera_permission_enable_camera">Habilitar la cámara</string>
|
|
74
|
-
<string name="soyio_facetec_camera_permission_launch_settings">Abrir la configuración</string>
|
|
75
|
-
|
|
76
|
-
<!-- Initializing -->
|
|
77
|
-
<string name="soyio_facetec_initializing_camera">Inicializando validación de identidad...</string>
|
|
78
|
-
|
|
79
|
-
<!-- ID Scan -->
|
|
80
|
-
<string name="soyio_facetec_idscan_type_selection_header">Ahora, prepárate para\nescanear tu cédula</string>
|
|
81
|
-
<string name="soyio_facetec_idscan_capture_id_front_instruction_message">Frente de tu cédula</string>
|
|
82
|
-
<string name="soyio_facetec_idscan_capture_id_back_instruction_message">Reverso de tu cédula</string>
|
|
83
|
-
<string name="soyio_facetec_idscan_review_id_front_instruction_message">Verifica que sea nítida y legible</string>
|
|
84
|
-
<string name="soyio_facetec_idscan_review_id_back_instruction_message">Verifica que sea nítida y legible</string>
|
|
85
|
-
<string name="soyio_facetec_idscan_additional_review_message">Se requiere\nuna verificación adicional</string>
|
|
86
|
-
<string name="soyio_facetec_idscan_ocr_confirmation_main_header">Revisar y confirmar</string>
|
|
87
|
-
<string name="soyio_facetec_idscan_ocr_confirmation_scroll_message">Desplácese hacia abajo</string>
|
|
88
|
-
<string name="soyio_facetec_idscan_feedback_flip_id_to_back_message">Sigamos con el reverso de tu cédula</string>
|
|
89
|
-
<string name="soyio_facetec_idscan_capture_screen_focus_message">Presiona para enfocar</string>
|
|
90
|
-
<string name="soyio_facetec_idscan_capture_tap_to_focus_message">Mantén tu teléfono quieto.</string>
|
|
91
|
-
<string name="soyio_facetec_idscan_capture_hold_steady_message">Mantente quieto</string>
|
|
92
|
-
|
|
93
|
-
<!-- ID Scan - NFC -->
|
|
94
|
-
<string name="soyio_facetec_idscan_nfc_status_disabled_message">Habilita el NFC\nen la configuración de tu dispositivo\npara continuar</string>
|
|
95
|
-
<string name="soyio_facetec_idscan_nfc_status_ready_message">Prepárate para escanear\nel chip de tu pasaporte electrónico</string>
|
|
96
|
-
<string name="soyio_facetec_idscan_nfc_card_status_ready_message">Prepárate para escanear\nel chip de tu cédula</string>
|
|
97
|
-
<string name="soyio_facetec_idscan_nfc_status_starting_message">Acerca la parte de atrás de tu\nteléfono a la cédula</string>
|
|
98
|
-
<string name="soyio_facetec_idscan_nfc_card_status_starting_message">Acerca la parte de atrás de tu\nteléfono a la cédula</string>
|
|
99
|
-
<string name="soyio_facetec_idscan_nfc_status_scanning_message">Cuando sientas una vibración,\nmantenlo quieto para completar\nla validación.</string>
|
|
100
|
-
<string name="soyio_facetec_idscan_nfc_status_weak_connection_message">Intentemos\notro escaneo</string>
|
|
101
|
-
<string name="soyio_facetec_idscan_nfc_status_finished_with_success_message">Escaneo de documentos\ncompletado</string>
|
|
102
|
-
<string name="soyio_facetec_idscan_nfc_status_finished_with_error_message">No se puede leer\nel chip del pasaporte electrónico</string>
|
|
103
|
-
<string name="soyio_facetec_idscan_nfc_card_status_finished_with_error_message">No se puede leer\nel chip de la cédula</string>
|
|
104
|
-
<string name="soyio_facetec_idscan_nfc_status_skipped_message">Escaneo NFC\nomitido</string>
|
|
105
|
-
|
|
106
|
-
<!-- Result Messages -->
|
|
107
|
-
<string name="soyio_facetec_result_success_message">Validación de identidad completa</string>
|
|
108
|
-
<string name="soyio_facetec_result_facescan_upload_message">Analizando tu selfie</string>
|
|
109
|
-
<string name="soyio_facetec_result_idscan_upload_message">Analizando la imagen de la\ncédula</string>
|
|
110
|
-
<string name="soyio_facetec_result_nfc_upload_message">Analizando la información NFC</string>
|
|
111
|
-
<string name="soyio_facetec_result_idscan_unsuccess_message">La foto de la cédula\nno coincide con el rostro del usuario</string>
|
|
112
|
-
<string name="soyio_facetec_result_idscan_success_front_side_message">Escaneo de cédula completado</string>
|
|
113
|
-
<string name="soyio_facetec_result_idscan_success_front_side_back_next_message">Lado frontal de la cédula\nescaneado</string>
|
|
114
|
-
<string name="soyio_facetec_result_idscan_success_front_side_nfc_next_message">Frente de la cédula\nescaneado</string>
|
|
115
|
-
<string name="soyio_facetec_result_idscan_success_back_side_message">Escaneo de cédula completado</string>
|
|
116
|
-
<string name="soyio_facetec_result_idscan_success_back_side_nfc_next_message">Reverso de la cédula\nescaneado</string>
|
|
117
|
-
<string name="soyio_facetec_result_idscan_success_passport_message">Escaneo de pasaporte completado</string>
|
|
118
|
-
<string name="soyio_facetec_result_idscan_success_passport_nfc_next_message">Pasaporte escaneado</string>
|
|
119
|
-
<string name="soyio_facetec_result_idscan_success_user_confirmation_message">Escaneo de la cédula con fotografía\ncompletado</string>
|
|
120
|
-
<string name="soyio_facetec_result_idscan_success_nfc_message">Escaneo de cédula completado</string>
|
|
121
|
-
<string name="soyio_facetec_result_idscan_success_additional_review_message">Captura de la fotografía de la cédula\ncompletada</string>
|
|
122
|
-
<string name="soyio_facetec_result_idscan_skip_or_error_nfc_message">Información de la cédula\nsubida</string>
|
|
123
|
-
<string name="soyio_facetec_result_idscan_retry_face_did_not_match_message">El rostro no coincide\nlo suficiente</string>
|
|
124
|
-
<string name="soyio_facetec_result_idscan_retry_id_not_fully_visible_message">La cédula\nno es totalmente visible</string>
|
|
125
|
-
<string name="soyio_facetec_result_idscan_retry_ocr_results_not_good_enough_message">El texto de la cédula no es legible</string>
|
|
126
|
-
<string name="soyio_facetec_result_idscan_retry_id_type_not_supported_message">No se admite este tipo de identificación\nUtiliza una identificación diferente</string>
|
|
127
|
-
<string name="soyio_facetec_result_idscan_retry_barcode_not_read_message">No se pudo escanear el código de barras\nInténtalo de nuevo</string>
|
|
128
|
-
|
|
129
|
-
<!-- Retry - Official ID Photo -->
|
|
130
|
-
<string name="soyio_facetec_retry_official_id_photo_subheader_message">La foto debe tener más calidad</string>
|
|
131
|
-
<string name="soyio_facetec_retry_official_id_photo_instruction_message">Usa luz interior,\nsin sonreír, lentes con reflejos o sombrero</string>
|
|
132
|
-
<string name="soyio_facetec_retry_official_id_photo_your_image_label">Tu imagen</string>
|
|
133
|
-
<string name="soyio_facetec_retry_official_id_photo_ideal_image_label">Cara conforme</string>
|
|
134
|
-
</resources>
|
package/assets/adaptive-icon.png
DELETED
|
Binary file
|
package/assets/favicon.png
DELETED
|
Binary file
|
|
Binary file
|
package/assets/icon.png
DELETED
|
Binary file
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"images" : [
|
|
3
|
-
{
|
|
4
|
-
"filename" : "facetec-close@1x.png",
|
|
5
|
-
"idiom" : "universal",
|
|
6
|
-
"scale" : "1x"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"filename" : "facetec-close@2x.png",
|
|
10
|
-
"idiom" : "universal",
|
|
11
|
-
"scale" : "2x"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"filename" : "facetec-close@3x.png",
|
|
15
|
-
"idiom" : "universal",
|
|
16
|
-
"scale" : "3x"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"info" : {
|
|
20
|
-
"author" : "xcode",
|
|
21
|
-
"version" : 1
|
|
22
|
-
}
|
|
23
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"images" : [
|
|
3
|
-
{
|
|
4
|
-
"filename" : "facetec-id-front@1x.png",
|
|
5
|
-
"idiom" : "universal",
|
|
6
|
-
"scale" : "1x"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"filename" : "facetec-id-front@2x.png",
|
|
10
|
-
"idiom" : "universal",
|
|
11
|
-
"scale" : "2x"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"filename" : "facetec-id-front@3x.png",
|
|
15
|
-
"idiom" : "universal",
|
|
16
|
-
"scale" : "3x"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"info" : {
|
|
20
|
-
"author" : "xcode",
|
|
21
|
-
"version" : 1
|
|
22
|
-
}
|
|
23
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/splash.png
DELETED
|
Binary file
|
package/ios/ApiDate.swift
DELETED
package/ios/FacetecConfig.swift
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import UIKit
|
|
2
|
-
import Foundation
|
|
3
|
-
import FaceTecSDK
|
|
4
|
-
|
|
5
|
-
class FacetecConfig {
|
|
6
|
-
|
|
7
|
-
private static let resourceBundle: Bundle = {
|
|
8
|
-
let frameworkBundle = Bundle(for: FacetecConfig.self)
|
|
9
|
-
guard let resourceBundleURL = frameworkBundle.url(forResource: "SoyioRnSdk", withExtension: "bundle"),
|
|
10
|
-
let resourceBundle = Bundle(url: resourceBundleURL) else {
|
|
11
|
-
return frameworkBundle
|
|
12
|
-
}
|
|
13
|
-
return resourceBundle
|
|
14
|
-
}()
|
|
15
|
-
|
|
16
|
-
private static func customFont(size: CGFloat, weight: UIFont.Weight) -> UIFont {
|
|
17
|
-
let fontName = "RobotoFlex"
|
|
18
|
-
|
|
19
|
-
if let customFont = UIFont(name: fontName, size: size) {
|
|
20
|
-
let descriptor = customFont.fontDescriptor.addingAttributes([
|
|
21
|
-
.traits: [UIFontDescriptor.TraitKey.weight: weight.rawValue]
|
|
22
|
-
])
|
|
23
|
-
return UIFont(descriptor: descriptor, size: size)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return UIFont.systemFont(ofSize: size, weight: weight)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static func apply(theme: [String: String]?) {
|
|
30
|
-
FaceTec.sdk.setDynamicStrings(FacetecStrings.spanish)
|
|
31
|
-
let customization = FacetecConfig.retrieveConfigurationWizardCustomization(withTheme: theme)
|
|
32
|
-
FaceTec.sdk.setCustomization(customization)
|
|
33
|
-
FaceTec.sdk.setLowLightCustomization(customization)
|
|
34
|
-
FaceTec.sdk.setDynamicDimmingCustomization(customization)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
public static func retrieveConfigurationWizardCustomization(withTheme theme: [String: String]?) -> FaceTecCustomization {
|
|
39
|
-
let black = UIColor(hexString: "#000000")
|
|
40
|
-
let white = UIColor(hexString: "#ffffff")
|
|
41
|
-
|
|
42
|
-
let mainColor: UIColor
|
|
43
|
-
let buttonColorHighlight: UIColor
|
|
44
|
-
let buttonColorDisabled: UIColor
|
|
45
|
-
|
|
46
|
-
if let hex = theme?["mainColor"], !hex.isEmpty {
|
|
47
|
-
mainColor = UIColor(hexString: hex)
|
|
48
|
-
} else {
|
|
49
|
-
mainColor = UIColor(hexString: "#3340CF")
|
|
50
|
-
}
|
|
51
|
-
if let hex = theme?["highlightColor"], !hex.isEmpty {
|
|
52
|
-
buttonColorHighlight = UIColor(hexString: hex)
|
|
53
|
-
} else {
|
|
54
|
-
buttonColorHighlight = UIColor(hexString: "#2A35B0")
|
|
55
|
-
}
|
|
56
|
-
if let hex = theme?["disabledColor"], !hex.isEmpty {
|
|
57
|
-
buttonColorDisabled = UIColor(hexString: hex)
|
|
58
|
-
} else {
|
|
59
|
-
buttonColorDisabled = UIColor(hexString: "#9BA3D8")
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
let outerBackgroundColor = white
|
|
63
|
-
let frameColor = white
|
|
64
|
-
let borderColor = white
|
|
65
|
-
let ovalColor = mainColor
|
|
66
|
-
let dualSpinnerColor = mainColor
|
|
67
|
-
let buttonAndFeedbackBarColor = mainColor
|
|
68
|
-
let buttonAndFeedbackBarTextColor = white
|
|
69
|
-
let feedbackBackgroundLayer = CAGradientLayer.init()
|
|
70
|
-
feedbackBackgroundLayer.colors = [black.cgColor, black.cgColor]
|
|
71
|
-
feedbackBackgroundLayer.locations = [0,1]
|
|
72
|
-
feedbackBackgroundLayer.startPoint = CGPoint.init(x: 0, y: 0)
|
|
73
|
-
feedbackBackgroundLayer.endPoint = CGPoint.init(x: 1, y: 0)
|
|
74
|
-
|
|
75
|
-
// For Frame Corner Radius Customization
|
|
76
|
-
let frameCornerRadius: Int32 = 20
|
|
77
|
-
|
|
78
|
-
let cancelImage = UIImage(named: "facetec-close", in: resourceBundle, compatibleWith: nil)
|
|
79
|
-
let cancelButtonLocation: FaceTecCancelButtonLocation = .topLeft
|
|
80
|
-
|
|
81
|
-
// For Image Customization
|
|
82
|
-
let securityWatermarkImage: FaceTecSecurityWatermarkImage = .faceTec
|
|
83
|
-
|
|
84
|
-
// Set a Default Customization
|
|
85
|
-
let defaultCustomization = FaceTecCustomization()
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
// Set Frame Customization
|
|
89
|
-
defaultCustomization.frameCustomization.cornerRadius = frameCornerRadius
|
|
90
|
-
defaultCustomization.frameCustomization.backgroundColor = frameColor
|
|
91
|
-
defaultCustomization.frameCustomization.borderColor = borderColor
|
|
92
|
-
|
|
93
|
-
// Set Overlay Customization
|
|
94
|
-
defaultCustomization.overlayCustomization.showBrandingImage = false
|
|
95
|
-
defaultCustomization.overlayCustomization.backgroundColor = outerBackgroundColor
|
|
96
|
-
|
|
97
|
-
// Set Guidance Customization
|
|
98
|
-
defaultCustomization.guidanceCustomization.backgroundColors = [frameColor, frameColor]
|
|
99
|
-
defaultCustomization.guidanceCustomization.foregroundColor = black
|
|
100
|
-
defaultCustomization.guidanceCustomization.buttonBackgroundNormalColor = buttonAndFeedbackBarColor
|
|
101
|
-
defaultCustomization.guidanceCustomization.buttonBackgroundDisabledColor = buttonColorDisabled
|
|
102
|
-
defaultCustomization.guidanceCustomization.buttonBackgroundHighlightColor = buttonColorHighlight
|
|
103
|
-
defaultCustomization.guidanceCustomization.buttonCornerRadius = 8
|
|
104
|
-
defaultCustomization.guidanceCustomization.buttonTextNormalColor = buttonAndFeedbackBarTextColor
|
|
105
|
-
defaultCustomization.guidanceCustomization.buttonTextDisabledColor = buttonAndFeedbackBarTextColor
|
|
106
|
-
defaultCustomization.guidanceCustomization.buttonTextHighlightColor = buttonAndFeedbackBarTextColor
|
|
107
|
-
defaultCustomization.guidanceCustomization.retryScreenImageBorderColor = borderColor
|
|
108
|
-
defaultCustomization.guidanceCustomization.retryScreenOvalStrokeColor = borderColor
|
|
109
|
-
|
|
110
|
-
// Set Oval Customization
|
|
111
|
-
defaultCustomization.ovalCustomization.strokeColor = ovalColor
|
|
112
|
-
defaultCustomization.ovalCustomization.progressColor1 = dualSpinnerColor
|
|
113
|
-
defaultCustomization.ovalCustomization.progressColor2 = dualSpinnerColor
|
|
114
|
-
|
|
115
|
-
// Set Feedback Customization
|
|
116
|
-
defaultCustomization.feedbackCustomization.backgroundColor = feedbackBackgroundLayer
|
|
117
|
-
defaultCustomization.feedbackCustomization.textColor = buttonAndFeedbackBarTextColor
|
|
118
|
-
|
|
119
|
-
// Set Cancel Customization
|
|
120
|
-
defaultCustomization.cancelButtonCustomization.customImage = cancelImage
|
|
121
|
-
defaultCustomization.cancelButtonCustomization.location = cancelButtonLocation
|
|
122
|
-
|
|
123
|
-
// Set Result Screen Customization
|
|
124
|
-
defaultCustomization.resultScreenCustomization.backgroundColors = [frameColor, frameColor]
|
|
125
|
-
defaultCustomization.resultScreenCustomization.foregroundColor = black
|
|
126
|
-
defaultCustomization.resultScreenCustomization.activityIndicatorColor = buttonAndFeedbackBarColor
|
|
127
|
-
defaultCustomization.resultScreenCustomization.resultAnimationBackgroundColor = buttonAndFeedbackBarColor
|
|
128
|
-
defaultCustomization.resultScreenCustomization.resultAnimationForegroundColor = buttonAndFeedbackBarTextColor
|
|
129
|
-
defaultCustomization.resultScreenCustomization.uploadProgressFillColor = buttonAndFeedbackBarColor
|
|
130
|
-
|
|
131
|
-
// Set Security Watermark Customization
|
|
132
|
-
defaultCustomization.securityWatermarkImage = securityWatermarkImage
|
|
133
|
-
|
|
134
|
-
// Set ID Scan Customization
|
|
135
|
-
defaultCustomization.idScanCustomization.selectionScreenDocumentImage = UIImage(named: "facetec-id-front", in: resourceBundle, compatibleWith: nil)
|
|
136
|
-
defaultCustomization.idScanCustomization.selectionScreenForegroundColor = black // text color of instructions
|
|
137
|
-
defaultCustomization.idScanCustomization.reviewScreenBackgroundColors = [frameColor, frameColor]
|
|
138
|
-
defaultCustomization.idScanCustomization.reviewScreenForegroundColor = buttonAndFeedbackBarTextColor
|
|
139
|
-
defaultCustomization.idScanCustomization.reviewScreenTextBackgroundColor = buttonAndFeedbackBarColor
|
|
140
|
-
defaultCustomization.idScanCustomization.captureScreenForegroundColor = buttonAndFeedbackBarTextColor
|
|
141
|
-
defaultCustomization.idScanCustomization.captureScreenTextBackgroundColor = black
|
|
142
|
-
defaultCustomization.idScanCustomization.buttonBackgroundNormalColor = buttonAndFeedbackBarColor
|
|
143
|
-
defaultCustomization.idScanCustomization.buttonBackgroundDisabledColor = buttonColorDisabled
|
|
144
|
-
defaultCustomization.idScanCustomization.buttonBackgroundHighlightColor = buttonColorHighlight
|
|
145
|
-
defaultCustomization.idScanCustomization.buttonTextNormalColor = buttonAndFeedbackBarTextColor
|
|
146
|
-
defaultCustomization.idScanCustomization.buttonTextDisabledColor = buttonAndFeedbackBarTextColor
|
|
147
|
-
defaultCustomization.idScanCustomization.buttonTextHighlightColor = buttonAndFeedbackBarTextColor
|
|
148
|
-
defaultCustomization.idScanCustomization.captureScreenBackgroundColor = frameColor
|
|
149
|
-
defaultCustomization.idScanCustomization.captureFrameStrokeColor = borderColor
|
|
150
|
-
defaultCustomization.idScanCustomization.buttonCornerRadius = 8
|
|
151
|
-
|
|
152
|
-
// MARK: - Font Configuration (matching web Config.ts)
|
|
153
|
-
let regularFont = customFont(size: 16, weight: .regular)
|
|
154
|
-
let mediumFont = customFont(size: 16, weight: .medium)
|
|
155
|
-
let semiBoldFont = customFont(size: 18, weight: .semibold)
|
|
156
|
-
let boldFont = customFont(size: 18, weight: .bold)
|
|
157
|
-
|
|
158
|
-
// Guidance Customization Fonts
|
|
159
|
-
defaultCustomization.guidanceCustomization.headerFont = semiBoldFont
|
|
160
|
-
defaultCustomization.guidanceCustomization.subtextFont = regularFont
|
|
161
|
-
defaultCustomization.guidanceCustomization.buttonFont = boldFont
|
|
162
|
-
defaultCustomization.guidanceCustomization.readyScreenHeaderFont = semiBoldFont
|
|
163
|
-
defaultCustomization.guidanceCustomization.readyScreenSubtextFont = regularFont
|
|
164
|
-
defaultCustomization.guidanceCustomization.retryScreenHeaderFont = semiBoldFont
|
|
165
|
-
defaultCustomization.guidanceCustomization.retryScreenSubtextFont = regularFont
|
|
166
|
-
|
|
167
|
-
// ID Scan Customization Fonts
|
|
168
|
-
defaultCustomization.idScanCustomization.headerFont = semiBoldFont
|
|
169
|
-
defaultCustomization.idScanCustomization.subtextFont = regularFont
|
|
170
|
-
defaultCustomization.idScanCustomization.buttonFont = boldFont
|
|
171
|
-
|
|
172
|
-
// OCR Confirmation Customization Fonts
|
|
173
|
-
defaultCustomization.ocrConfirmationCustomization.mainHeaderFont = boldFont
|
|
174
|
-
defaultCustomization.ocrConfirmationCustomization.sectionHeaderFont = semiBoldFont
|
|
175
|
-
defaultCustomization.ocrConfirmationCustomization.fieldLabelFont = regularFont
|
|
176
|
-
defaultCustomization.ocrConfirmationCustomization.fieldValueFont = regularFont
|
|
177
|
-
defaultCustomization.ocrConfirmationCustomization.inputFieldFont = regularFont
|
|
178
|
-
defaultCustomization.ocrConfirmationCustomization.inputFieldPlaceholderFont = regularFont
|
|
179
|
-
defaultCustomization.ocrConfirmationCustomization.buttonFont = boldFont
|
|
180
|
-
|
|
181
|
-
// Result Screen Customization Font
|
|
182
|
-
defaultCustomization.resultScreenCustomization.messageFont = regularFont
|
|
183
|
-
|
|
184
|
-
// Feedback Customization Font
|
|
185
|
-
defaultCustomization.feedbackCustomization.textFont = mediumFont
|
|
186
|
-
|
|
187
|
-
// Initial Loading Animation Font
|
|
188
|
-
defaultCustomization.initialLoadingAnimationCustomization.messageFont = regularFont
|
|
189
|
-
|
|
190
|
-
return defaultCustomization
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
static var currentCustomization: FaceTecCustomization = retrieveConfigurationWizardCustomization(withTheme: nil)
|
|
194
|
-
|
|
195
|
-
static let wasSDKConfiguredWithConfigWizard = true
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
extension UIColor {
|
|
200
|
-
convenience init(hexString: String) {
|
|
201
|
-
let hex = hexString.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
|
|
202
|
-
var int = UInt64()
|
|
203
|
-
Scanner(string: hex).scanHexInt64(&int)
|
|
204
|
-
let a, r, g, b: UInt64
|
|
205
|
-
switch hex.count {
|
|
206
|
-
case 3: // RGB (12-bit)
|
|
207
|
-
(a, r, g, b) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17)
|
|
208
|
-
case 6: // RGB (24-bit)
|
|
209
|
-
(a, r, g, b) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF)
|
|
210
|
-
case 8: // ARGB (32-bit)
|
|
211
|
-
(a, r, g, b) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF)
|
|
212
|
-
default:
|
|
213
|
-
(a, r, g, b) = (255, 0, 0, 0)
|
|
214
|
-
}
|
|
215
|
-
self.init(red: CGFloat(r) / 255, green: CGFloat(g) / 255, blue: CGFloat(b) / 255, alpha: CGFloat(a) / 255)
|
|
216
|
-
}
|
|
217
|
-
}
|