@oiti/rn-liveness3d 1.0.0 → 1.0.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.
Files changed (195) hide show
  1. package/README.md +6 -0
  2. package/android/build.gradle +23 -1
  3. package/android/settings.gradle +6 -0
  4. package/android/src/main/AndroidManifest.xml +3 -1
  5. package/android/src/main/java/br/com/oiti/rnliveness3d/RnLiveness3dModule.kt +136 -0
  6. package/android/src/main/java/{com → br/com}/oiti/rnliveness3d/RnLiveness3dPackage.kt +2 -2
  7. package/ios/Podfile +7 -3
  8. package/ios/Podfile.lock +7 -7
  9. package/ios/Pods/Manifest.lock +7 -7
  10. package/ios/RnLiveness3d.m +16 -1
  11. package/ios/RnLiveness3d.swift +203 -10
  12. package/ios/RnLiveness3d.xcodeproj/project.pbxproj +2 -1
  13. package/ios/info.plist +8 -0
  14. package/lib/commonjs/@types/ArgsType.js +2 -0
  15. package/lib/commonjs/@types/ArgsType.js.map +1 -0
  16. package/lib/commonjs/assets/images/imgOp.png +0 -0
  17. package/lib/commonjs/assets/images/left-arrow-b.png +0 -0
  18. package/lib/commonjs/assets/images/rigth-arrow.png +0 -0
  19. package/lib/commonjs/index.js +149 -7
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/screens/Liveness3D/InstructionsView.js +209 -0
  22. package/lib/commonjs/screens/Liveness3D/InstructionsView.js.map +1 -0
  23. package/lib/commonjs/screens/{InstructionsView.js → PermissionView.js} +108 -65
  24. package/lib/commonjs/screens/PermissionView.js.map +1 -0
  25. package/lib/commonjs/utils/normalize.js +16 -0
  26. package/lib/commonjs/utils/normalize.js.map +1 -0
  27. package/lib/module/@types/ArgsType.js +2 -0
  28. package/lib/module/@types/ArgsType.js.map +1 -0
  29. package/lib/module/assets/images/imgOp.png +0 -0
  30. package/lib/module/assets/images/left-arrow-b.png +0 -0
  31. package/lib/module/assets/images/rigth-arrow.png +0 -0
  32. package/lib/module/index.js +143 -7
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/module/screens/Liveness3D/InstructionsView.js +201 -0
  35. package/lib/module/screens/Liveness3D/InstructionsView.js.map +1 -0
  36. package/lib/module/screens/PermissionView.js +170 -0
  37. package/lib/module/screens/PermissionView.js.map +1 -0
  38. package/lib/module/utils/normalize.js +10 -0
  39. package/lib/module/utils/normalize.js.map +1 -0
  40. package/lib/typescript/@types/ArgsType.d.ts +12 -0
  41. package/lib/typescript/@types/ArgsType.d.ts.map +1 -0
  42. package/lib/typescript/index.d.ts +15 -3
  43. package/lib/typescript/index.d.ts.map +1 -1
  44. package/lib/typescript/screens/Liveness3D/InstructionsView.d.ts +5 -0
  45. package/lib/typescript/screens/Liveness3D/InstructionsView.d.ts.map +1 -0
  46. package/lib/typescript/screens/PermissionView.d.ts +5 -0
  47. package/lib/typescript/screens/PermissionView.d.ts.map +1 -0
  48. package/lib/typescript/utils/normalize.d.ts +2 -0
  49. package/lib/typescript/utils/normalize.d.ts.map +1 -0
  50. package/oiti-rn-liveness3d.podspec +2 -1
  51. package/package.json +1 -1
  52. package/src/@types/ArgsType.ts +12 -0
  53. package/src/assets/images/imgOp.png +0 -0
  54. package/src/assets/images/left-arrow-b.png +0 -0
  55. package/src/assets/images/rigth-arrow.png +0 -0
  56. package/src/index.tsx +173 -8
  57. package/src/screens/Liveness3D/InstructionsView.tsx +214 -0
  58. package/src/screens/PermissionView.tsx +174 -0
  59. package/src/utils/normalize.tsx +10 -0
  60. package/android/src/main/java/com/oiti/rnliveness3d/RnLiveness3dModule.kt +0 -24
  61. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/Info.plist +0 -42
  62. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Assets.car +0 -0
  63. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/FaceCaptcha +0 -0
  64. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/objects-11.0+.nib +0 -0
  65. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/runtime.nib +0 -0
  66. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Headers/FaceCaptcha-Swift.h +0 -666
  67. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Headers/FaceCaptcha.h +0 -19
  68. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Info.plist +0 -0
  69. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Bold.otf +0 -0
  70. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Bold.ttf +0 -0
  71. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Medium.otf +0 -0
  72. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Medium.ttf +0 -0
  73. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Regular.otf +0 -0
  74. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Regular.ttf +0 -0
  75. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-SemiBold.otf +0 -0
  76. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  77. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios.swiftinterface +0 -2189
  78. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/armv7-apple-ios.swiftdoc +0 -0
  79. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/armv7-apple-ios.swiftinterface +0 -2189
  80. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/module.modulemap +0 -11
  81. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Bold.otf +0 -0
  82. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Bold.ttf +0 -0
  83. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Light.otf +0 -0
  84. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Medium.otf +0 -0
  85. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Medium.ttf +0 -0
  86. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Regular.ttf +0 -0
  87. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/_CodeSignature/CodeResources +0 -1304
  88. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/animation_loading.gif +0 -0
  89. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Assets.car +0 -0
  90. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/FaceCaptcha +0 -0
  91. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/objects-11.0+.nib +0 -0
  92. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/runtime.nib +0 -0
  93. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Headers/FaceCaptcha-Swift.h +0 -998
  94. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Headers/FaceCaptcha.h +0 -19
  95. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Info.plist +0 -0
  96. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Bold.otf +0 -0
  97. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Bold.ttf +0 -0
  98. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Medium.otf +0 -0
  99. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Medium.ttf +0 -0
  100. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Regular.otf +0 -0
  101. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Regular.ttf +0 -0
  102. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-SemiBold.otf +0 -0
  103. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  104. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios-simulator.swiftinterface +0 -2189
  105. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/i386-apple-ios-simulator.swiftdoc +0 -0
  106. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/i386-apple-ios-simulator.swiftinterface +0 -2189
  107. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  108. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +0 -2189
  109. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/module.modulemap +0 -11
  110. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Bold.otf +0 -0
  111. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Bold.ttf +0 -0
  112. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Light.otf +0 -0
  113. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Medium.otf +0 -0
  114. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Medium.ttf +0 -0
  115. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Regular.ttf +0 -0
  116. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/_CodeSignature/CodeResources +0 -582
  117. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/animation_loading.gif +0 -0
  118. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework.zip +0 -0
  119. package/ios/Pods/FaceCaptcha/LICENSE +0 -1
  120. package/ios/Pods/FaceCaptcha/README.md +0 -99
  121. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/Info.plist +0 -42
  122. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Assets.car +0 -0
  123. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/FaceTecSDK +0 -0
  124. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/GenericGuidanceContentLayout.nib +0 -0
  125. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Headers/FaceTecPublicApi.h +0 -1894
  126. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Headers/FaceTecPublicStringKeys.h +0 -92
  127. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Headers/FaceTecSDK.h +0 -16
  128. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Info.plist +0 -0
  129. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Modules/module.modulemap +0 -6
  130. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/ReadyScreenGuidanceContentLayout.nib +0 -0
  131. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/RetryScreenGuidanceContentLayout.nib +0 -0
  132. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/SharedGuidanceLayout.nib +0 -0
  133. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/9Uo-4b-JiE-view-Ae0-rb-UqS.nib +0 -0
  134. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/CJ6-MX-bJp-view-8JL-Rc-0g1.nib +0 -0
  135. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/FaceScanViewController.nib +0 -0
  136. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/FaceTecAdditionalReviewViewController.nib +0 -0
  137. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/FaceTecOCRConfirmationViewController.nib +0 -0
  138. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/IDCaptureViewController.nib +0 -0
  139. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/IDSelectionViewController.nib +0 -0
  140. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/Info.plist +0 -0
  141. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/Pyw-6G-JSY-view-Zue-Eo-Q2U.nib +0 -0
  142. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/alz-Ia-X3d-view-IKu-EI-Hug.nib +0 -0
  143. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/l2Q-cc-kD8-view-UUy-6c-meu.nib +0 -0
  144. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/attributions.txt +0 -137
  145. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/1f5b84f51ce0fcfbb76e904b7bcaa7560f601e1394a0b29367a09385312287eb +0 -0
  146. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/2b075ac1a6132b5b8a4c9ef0ba6b0cd84db7838aca9a000e50d907f40770a4ab +0 -0
  147. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/4c4774668f9b9333977fc891e7695420a0b4c27cc2c1cd3920ce9e0870e3c0e8 +0 -0
  148. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/59cc2a9af81aaca2376702c2490650f4da2775fa673274db98aad41b7ef101c0 +0 -0
  149. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/5b63e98b991aedabb60665503384f30bffd939decf9433883b30b78011ee501a +0 -0
  150. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/66388dc76dc16bc6b76b682edd218a575bf45b9b +0 -0
  151. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/6b3133f0f39ff89a2a169d61176ee17cafacc5e288f334e2b64ee82892d11ccd +0 -0
  152. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/9077d16225f9314163ef1e7db6fc7d4088bb903d134bd95f23d5591ca4dfbfca +0 -0
  153. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/Ys4TQh4aewlf1CpyzWLi +0 -0
  154. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/a74f2afb9d20f2375ccbd14e67c094b85c89ceb608f7cf8ae04f3f646a6c5672 +0 -0
  155. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/b501893e75f62ee1707643e35b21109927b07ed5b202321c961b424cbc2e4695 +0 -0
  156. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/b82962a4847bcf6d1bf89ea7543f83e184a1df7c4e7e3c343dd3e3e17cb9a645 +0 -0
  157. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/dbd7a353f0130bb983d6ba05917e9be991d70e8f028df4b74e30bc6497ef7f71 +0 -0
  158. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/f2.xml +0 -0
  159. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/fd6d368a5658496536e2bfae170d1b823a3629b242cafc09784bfba4e56d8c80 +0 -0
  160. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/marker +0 -0
  161. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/vu0ilin6we3lrzo5f83f7qs2jul4aq7v4aoynrmch8zfvpi8ezrfyafa4t0fx87l +0 -0
  162. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/en.lproj/FaceTec.strings +0 -0
  163. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/strip-unused-architectures-from-target.sh +0 -62
  164. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/FaceTecSDK +0 -0
  165. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecPublicApi.h +0 -1894
  166. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecPublicStringKeys.h +0 -92
  167. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecSDK.h +0 -16
  168. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Info.plist +0 -0
  169. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Modules/module.modulemap +0 -6
  170. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/_CodeSignature/CodeResources +0 -162
  171. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework.zip +0 -0
  172. package/ios/Pods/Pods.xcodeproj/project.pbxproj +0 -661
  173. package/ios/Pods/Target Support Files/FaceCaptcha/FaceCaptcha-xcframeworks.sh +0 -121
  174. package/ios/Pods/Target Support Files/FaceCaptcha/FaceCaptcha.debug.xcconfig +0 -16
  175. package/ios/Pods/Target Support Files/FaceCaptcha/FaceCaptcha.release.xcconfig +0 -16
  176. package/ios/Pods/Target Support Files/OILiveness3D_FT/OILiveness3D_FT-xcframeworks.sh +0 -121
  177. package/ios/Pods/Target Support Files/OILiveness3D_FT/OILiveness3D_FT.debug.xcconfig +0 -14
  178. package/ios/Pods/Target Support Files/OILiveness3D_FT/OILiveness3D_FT.release.xcconfig +0 -14
  179. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-Info.plist +0 -26
  180. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-acknowledgements.markdown +0 -8
  181. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-acknowledgements.plist +0 -40
  182. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-dummy.m +0 -5
  183. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-umbrella.h +0 -16
  184. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d.debug.xcconfig +0 -14
  185. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d.modulemap +0 -6
  186. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d.release.xcconfig +0 -14
  187. package/lib/commonjs/assets/images/wave_bg.svg +0 -4
  188. package/lib/commonjs/screens/InstructionsView.js.map +0 -1
  189. package/lib/module/assets/images/wave_bg.svg +0 -4
  190. package/lib/module/screens/InstructionsView.js +0 -126
  191. package/lib/module/screens/InstructionsView.js.map +0 -1
  192. package/lib/typescript/screens/InstructionsView.d.ts +0 -2
  193. package/lib/typescript/screens/InstructionsView.d.ts.map +0 -1
  194. package/src/assets/images/wave_bg.svg +0 -4
  195. package/src/screens/InstructionsView.tsx +0 -141
package/README.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Este repositório é responsável pela biblioteca NPM do Liveness Oiti, com ele é possível instalar e usar a função de `startLiveness3d()` e a view `<Liveness3dView />` da Oititec disponíveis para aplicativos híbridos em React Native.
4
4
 
5
+ ## 1.1 Requisitos Mínimos
6
+
7
+ | Android | iOS |
8
+ | ----------- | ------- |
9
+ | Gradle: 6.8 | iOS: 11 |
10
+
5
11
  # 2. O que é a biblioteca?
6
12
 
7
13
  O NPM (node package manager) é o gerenciador de pacotes do node.js (runtime de javascript).
@@ -5,6 +5,10 @@ buildscript {
5
5
  repositories {
6
6
  google()
7
7
  mavenCentral()
8
+ maven { url "https://raw.githubusercontent.com/oititec/android-oiti-versions-beta/master" }
9
+ maven {
10
+ url 'https://raw.githubusercontent.com/oititec/android-oiti-versions/master'
11
+ }
8
12
  }
9
13
 
10
14
  dependencies {
@@ -134,6 +138,24 @@ dependencies {
134
138
  //noinspection GradleDynamicVersion
135
139
  implementation "com.facebook.react:react-native:+"
136
140
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
141
+
142
+ implementation 'androidx.core:core-ktx:1.7.0'
143
+ implementation 'androidx.appcompat:appcompat:1.4.1'
144
+ implementation 'com.google.android.material:material:1.6.1'
145
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
146
+ implementation "org.bouncycastle:bcprov-jdk16:1.46"
147
+ implementation "com.squareup.okhttp3:logging-interceptor:4.9.3"
148
+ implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
149
+ implementation 'androidx.fragment:fragment-ktx:1.3.6'
150
+ implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0"
151
+ implementation group: 'com.google.code.gson', name: 'gson', version: '2.9.0'
152
+ implementation group: 'com.squareup.retrofit2', name: 'converter-gson', version: '2.9.0'
153
+ implementation "com.squareup.retrofit2:retrofit:2.9.0"
154
+ implementation 'androidx.databinding:databinding-runtime:4.2.2'
155
+
156
+ implementation 'br.com.oiti:liveness3d-sdk:6.7.1'
157
+ implementation 'br.com.oiti:security:1.2'
158
+
137
159
  // From node_modules
138
160
  }
139
161
 
@@ -141,6 +163,6 @@ if (isNewArchitectureEnabled()) {
141
163
  react {
142
164
  jsRootDir = file("../src/")
143
165
  libraryName = "RnLiveness3d"
144
- codegenJavaPackageName = "com.oiti.rnliveness3d"
166
+ codegenJavaPackageName = "br.com.oiti.rnliveness3d"
145
167
  }
146
168
  }
@@ -0,0 +1,6 @@
1
+ dependencyResolutionManagement {
2
+ // repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
3
+ repositories {
4
+ maven { url "https://raw.githubusercontent.com/oititec/android-oiti-versions/master" }
5
+ }
6
+ }
@@ -1,4 +1,6 @@
1
1
  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.oiti.rnliveness3d">
2
+ package="br.com.oiti.rnliveness3d">
3
+
4
+ <uses-permission android:name="android.permission.CAMERA" />
3
5
 
4
6
  </manifest>
@@ -0,0 +1,136 @@
1
+ package br.com.oiti.rnliveness3d
2
+
3
+ //import br.com.oiti.liveness3d.theme.Liveness3DTheme
4
+
5
+ import android.app.Activity
6
+ import android.content.Context
7
+ import android.content.Intent
8
+ import android.content.pm.PackageManager
9
+ import androidx.annotation.NonNull
10
+ import androidx.core.app.ActivityCompat
11
+ import androidx.core.content.*
12
+ import br.com.oiti.liveness3d.app.ui.HybridLiveness3DActivity
13
+ import br.com.oiti.liveness3d.data.model.ENVIRONMENT3D
14
+ import br.com.oiti.liveness3d.data.model.Liveness3DTextKey
15
+ import br.com.oiti.liveness3d.data.model.Liveness3DUser
16
+ import br.com.oiti.security.observability.firebase.FirebaseEvents
17
+ import com.facebook.react.bridge.*
18
+ import com.facebook.react.bridge.Promise
19
+ import com.facebook.react.bridge.ReactApplicationContext
20
+ import com.facebook.react.bridge.ReactContextBaseJavaModule
21
+ import com.facebook.react.bridge.ReactMethod
22
+
23
+ class RnLiveness3dModule(reactContext: ReactApplicationContext) :
24
+ ReactContextBaseJavaModule(reactContext) {
25
+
26
+
27
+ private val LIVENESS3D_REQUEST = 1
28
+ private val E_ACTIVITY_DOES_NOT_EXIST = "E_ACTIVITY_DOES_NOT_EXIST"
29
+ private val E_FAILED_TO_SHOW_PICKER = "E_FAILED_TO_SHOW_PICKER"
30
+ private val PERMISSION_REQUEST_CODE = 200
31
+
32
+ private var mLiveness3dPromisse: Promise? = null
33
+
34
+ private val mActivityEventListener: ActivityEventListener =
35
+ object : BaseActivityEventListener() {
36
+ override fun onActivityResult(
37
+ activity: Activity,
38
+ requestCode: Int,
39
+ resultCode: Int,
40
+ data: Intent?
41
+ ) {
42
+ if (requestCode == LIVENESS3D_REQUEST) {
43
+ if (mLiveness3dPromisse != null) {
44
+ if (resultCode == Activity.RESULT_CANCELED) {
45
+ mLiveness3dPromisse!!.reject(E_FAILED_TO_SHOW_PICKER,"RESULT_CANCELED")
46
+ } else if (resultCode == Activity.RESULT_OK) {
47
+ mLiveness3dPromisse!!.resolve("RESULT_OK")
48
+ }
49
+ mLiveness3dPromisse = null
50
+ }
51
+ }
52
+ }
53
+ }
54
+
55
+ override fun getName(): String {
56
+ return NAME
57
+ }
58
+
59
+ @ReactMethod
60
+ fun logevent(name: String, appKey: String) {
61
+ FirebaseEvents(name.toString(), appKey).apply()
62
+ }
63
+
64
+ @NonNull
65
+ @ReactMethod
66
+ fun startliveness3d(appKey: String, promise: Promise) {
67
+ val currentActivity = currentActivity
68
+
69
+ val texts = hashMapOf<Liveness3DTextKey, String>(
70
+ Liveness3DTextKey.READY_HEADER_1 to "Prepare-se para seu",
71
+ Liveness3DTextKey.READY_HEADER_2 to "reconhecimento facial.",
72
+ Liveness3DTextKey.READY_MESSAGE_1 to "Posicione o seu rosto na moldura, aproxime-se",
73
+ Liveness3DTextKey.READY_MESSAGE_2 to "e toque em começar.",
74
+ Liveness3DTextKey.READY_BUTTON to "Começar",
75
+
76
+ Liveness3DTextKey.RETRY_HEADER to "Vamos tentar novamente?",
77
+ Liveness3DTextKey.RETRY_SUBHEADER to "Siga o exemplo de foto ideal abaixo:",
78
+ Liveness3DTextKey.RETRY_MESSAGE_SMILE to "Expressão Neutra, Sem Sorrir",
79
+ Liveness3DTextKey.RETRY_MESSAGE_LIGHTING to "Evite reflexos e iluminação extrema.",
80
+ Liveness3DTextKey.RETRY_MESSAGE_CONTRAST to "Limpe Sua Câmera",
81
+ Liveness3DTextKey.RETRY_YOUR_PICTURE to "Sua foto",
82
+ Liveness3DTextKey.RETRY_IDEAL_PICTURE to "Foto ideal",
83
+ Liveness3DTextKey.RETRY_BUTTON to "Tentar novamente",
84
+
85
+ Liveness3DTextKey.RESULT_UPLOAD_MESSAGE to "Enviando...",
86
+ Liveness3DTextKey.RESULT_SUCCESS_MESSAGE to "Sucesso",
87
+
88
+ Liveness3DTextKey.FEEDBACK_CENTER_FACE to "Centralize Seu Rosto",
89
+ Liveness3DTextKey.FEEDBACK_FACE_NOT_FOUND to "Enquadre o Seu Rosto",
90
+ Liveness3DTextKey.FEEDBACK_FACE_NOT_LOOKING_STRAIGHT_AHEAD to "Olhe Para Frente",
91
+ Liveness3DTextKey.FEEDBACK_FACE_NOT_UPRIGHT to "Mantenha a Cabeça Reta",
92
+ Liveness3DTextKey.FEEDBACK_HOLD_STEADY to "Segure Firme",
93
+ Liveness3DTextKey.FEEDBACK_MOVE_PHONE_AWAY to "Afaste-se",
94
+ Liveness3DTextKey.FEEDBACK_MOVE_PHONE_CLOSER to "Aproxime-se",
95
+ Liveness3DTextKey.FEEDBACK_MOVE_PHONE_TO_EYE_LEVEL to "Telefone ao Nível dos Olhos",
96
+ Liveness3DTextKey.FEEDBACK_USE_EVEN_LIGHTING to "Ilumine Seu Rosto Uniformemente",
97
+
98
+ Liveness3DTextKey.FEEDBACK_FRAME_YOUR_FACE to "Encaixe Seu Rosto no Espaço Oval",
99
+ Liveness3DTextKey.FEEDBACK_HOLD_STEADY_1 to "Aguente Firme: 1",
100
+ Liveness3DTextKey.FEEDBACK_HOLD_STEADY_2 to "Aguente Firme: 2",
101
+ Liveness3DTextKey.FEEDBACK_HOLD_STEADY_3 to "Aguente Firme: 3",
102
+ Liveness3DTextKey.FEEDBACK_EYES_STRAIGHT_AHEAD to "Olhe Para Frente",
103
+ Liveness3DTextKey.FEEDBACK_REMOVE_DARK_GLASSES to "Tire Seus Óculos de Sol",
104
+ Liveness3DTextKey.FEEDBACK_NEUTRAL_EXPRESSION to "Fique Neutro, Não Sorria",
105
+ Liveness3DTextKey.FEEDBACK_CONDITIONS_TOO_BRIGHT to "Ambiente Muito Iluminado",
106
+ Liveness3DTextKey.FEEDBACK_BRIGHTEN_YOUR_ENVIRONMENT to "Ambiente Muito Escuro",
107
+ )
108
+
109
+ if (currentActivity == null) {
110
+ promise.reject(E_ACTIVITY_DOES_NOT_EXIST, "Activity doesn't exist")
111
+ return;
112
+ }
113
+
114
+ mLiveness3dPromisse = promise
115
+
116
+ try {
117
+ val liveness3DUser = Liveness3DUser(appKey = appKey, ENVIRONMENT3D.HML, null)
118
+ val intent = Intent(getCurrentActivity(), HybridLiveness3DActivity::class.java).apply {
119
+ putExtra(HybridLiveness3DActivity.PARAM_LIVENESS3D_USER, liveness3DUser)
120
+ putExtra(HybridLiveness3DActivity.PARAM_TEXTS, texts)
121
+ }
122
+ getCurrentActivity()?.startActivityForResult(intent, LIVENESS3D_REQUEST)
123
+ } catch (e: Exception) {
124
+ mLiveness3dPromisse?.reject(E_FAILED_TO_SHOW_PICKER, e)
125
+ mLiveness3dPromisse = null
126
+ }
127
+
128
+
129
+ }
130
+
131
+
132
+
133
+ companion object {
134
+ const val NAME = "RnLiveness3d"
135
+ }
136
+ }
@@ -1,10 +1,9 @@
1
- package com.oiti.rnliveness3d
1
+ package br.com.oiti.rnliveness3d
2
2
  import com.facebook.react.ReactPackage
3
3
  import com.facebook.react.bridge.NativeModule
4
4
  import com.facebook.react.bridge.ReactApplicationContext
5
5
  import com.facebook.react.uimanager.ViewManager
6
6
 
7
-
8
7
  class RnLiveness3dPackage : ReactPackage {
9
8
  override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
10
9
  return listOf(RnLiveness3dModule(reactContext))
@@ -13,4 +12,5 @@ class RnLiveness3dPackage : ReactPackage {
13
12
  override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
14
13
  return emptyList()
15
14
  }
15
+
16
16
  }
package/ios/Podfile CHANGED
@@ -1,11 +1,15 @@
1
- platform :ios, '10.0'
2
-
1
+ platform :ios, '11.0'
2
+ source 'https://github.com/oititec/liveness-ios-specs.git'
3
+ source 'https://github.com/oititec/ios-artifactory.git'
4
+ source 'https://github.com/CocoaPods/Specs.git'
5
+
3
6
 
4
7
  target 'RnLiveness3d' do
5
8
  # Comment the next line if you don't want to use dynamic frameworks
6
9
  use_frameworks!
7
10
 
8
11
  # Pods for sampleUsageLivenessSDK
9
- pod 'FaceCaptcha', '4.0.9-beta1', :source => 'https://github.com/oititec/liveness-ios-specs.git'
12
+ pod 'FaceCaptcha', '4.1.1'
13
+ # pod 'OISecurity', '1.0.0'
10
14
 
11
15
  end
package/ios/Podfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PODS:
2
- - FaceCaptcha (4.0.9-beta1):
3
- - OILiveness3D_FT (~> 9.6.10)
4
- - OILiveness3D_FT (9.6.10)
2
+ - FaceCaptcha (4.1.1):
3
+ - OILiveness3D_FT (= 9.6.25)
4
+ - OILiveness3D_FT (9.6.25)
5
5
 
6
6
  DEPENDENCIES:
7
- - FaceCaptcha (= 4.0.9-beta1)
7
+ - FaceCaptcha (= 4.1.1)
8
8
 
9
9
  SPEC REPOS:
10
10
  https://github.com/oititec/liveness-ios-specs.git:
@@ -12,9 +12,9 @@ SPEC REPOS:
12
12
  - OILiveness3D_FT
13
13
 
14
14
  SPEC CHECKSUMS:
15
- FaceCaptcha: 333c990eabb3c837bab2e65dc6f497abfe64a12e
16
- OILiveness3D_FT: c2b3b70fbd86e2fd5efc58f47d32b0aead995ae1
15
+ FaceCaptcha: 3ff2433d23d74df3ed18a591f7be5393f39c844f
16
+ OILiveness3D_FT: 9c794249edb23f2e9ba627392450ed385cb816e9
17
17
 
18
- PODFILE CHECKSUM: e469092854200fd852ed619087c5ac26e4af5dab
18
+ PODFILE CHECKSUM: 04a7f36f3e2491eca7ad5a1ef0bc3639b2827cde
19
19
 
20
20
  COCOAPODS: 1.12.0
@@ -1,10 +1,10 @@
1
1
  PODS:
2
- - FaceCaptcha (4.0.9-beta1):
3
- - OILiveness3D_FT (~> 9.6.10)
4
- - OILiveness3D_FT (9.6.10)
2
+ - FaceCaptcha (4.1.1):
3
+ - OILiveness3D_FT (= 9.6.25)
4
+ - OILiveness3D_FT (9.6.25)
5
5
 
6
6
  DEPENDENCIES:
7
- - FaceCaptcha (= 4.0.9-beta1)
7
+ - FaceCaptcha (= 4.1.1)
8
8
 
9
9
  SPEC REPOS:
10
10
  https://github.com/oititec/liveness-ios-specs.git:
@@ -12,9 +12,9 @@ SPEC REPOS:
12
12
  - OILiveness3D_FT
13
13
 
14
14
  SPEC CHECKSUMS:
15
- FaceCaptcha: 333c990eabb3c837bab2e65dc6f497abfe64a12e
16
- OILiveness3D_FT: c2b3b70fbd86e2fd5efc58f47d32b0aead995ae1
15
+ FaceCaptcha: 3ff2433d23d74df3ed18a591f7be5393f39c844f
16
+ OILiveness3D_FT: 9c794249edb23f2e9ba627392450ed385cb816e9
17
17
 
18
- PODFILE CHECKSUM: e469092854200fd852ed619087c5ac26e4af5dab
18
+ PODFILE CHECKSUM: 04a7f36f3e2491eca7ad5a1ef0bc3639b2827cde
19
19
 
20
20
  COCOAPODS: 1.12.0
@@ -2,10 +2,25 @@
2
2
 
3
3
  @interface RCT_EXTERN_MODULE(RnLiveness3d, NSObject)
4
4
 
5
- RCT_EXTERN_METHOD(startliveness3d:(NSString)appKey
5
+ RCT_EXTERN_METHOD(startliveness3d:(NSDictionary)args
6
6
  withResolver:(RCTPromiseResolveBlock)resolve
7
7
  withRejecter:(RCTPromiseRejectBlock)reject)
8
8
 
9
+ RCT_EXTERN_METHOD(logevent:(NSDictionary)args
10
+ withResolver:(RCTPromiseResolveBlock)resolve
11
+ withRejecter:(RCTPromiseRejectBlock)reject)
12
+
13
+
14
+ RCT_EXTERN_METHOD(checkiospermission:(NSDictionary)args
15
+ withResolver:(RCTPromiseResolveBlock)resolve
16
+ withRejecter:(RCTPromiseRejectBlock)reject)
17
+
18
+
19
+ RCT_EXTERN_METHOD(checkpermissiongranted:(NSDictionary)args
20
+ withResolver:(RCTPromiseResolveBlock)resolve
21
+ withRejecter:(RCTPromiseRejectBlock)reject)
22
+
23
+
9
24
  + (BOOL)requiresMainQueueSetup
10
25
  {
11
26
  return NO;
@@ -1,4 +1,23 @@
1
1
  import FaceCaptcha
2
+ import AVFoundation
3
+
4
+ class ObservabilityWorker {
5
+ private let configuration: OIObservability.EventConfigurationProtocol
6
+ private let manager: OIObservability.EventManagerProtocol
7
+
8
+ init(configuration: OIOBservability.EventConfigurationProtocol){
9
+ serf.configuration = configuration
10
+ self.manager = configuration.eventManager
11
+ }
12
+
13
+ func logEventHybrid(value: String){
14
+ let parameters: [String: Any] = [
15
+ "value": values,
16
+ "timestamp": Date().timeIntervalSince1970
17
+ ]
18
+ manager.logEvent(type: .ACTION_L3FT_instructionContinue, parameters: parameters)
19
+ }
20
+ }
2
21
 
3
22
  @objc(RnLiveness3d)
4
23
  class RnLiveness3d: NSObject, Liveness3DDelegate {
@@ -6,31 +25,205 @@ class RnLiveness3d: NSObject, Liveness3DDelegate {
6
25
  var resolve:RCTPromiseResolveBlock!
7
26
  var reject:RCTPromiseRejectBlock!
8
27
 
28
+ private let certifaceURL = "https://comercial.certiface.com.br:8443/"
29
+
9
30
  func handleLiveness3DValidation(validateModel: Liveness3DSuccess) {
10
31
  resolve("RESULT_OK")
11
32
  }
12
33
 
13
34
  func handleLiveness3DError(error: Liveness3DError) {
14
- resolve(error.code)
35
+ resolve(error.message)
36
+ }
37
+
38
+ @objc(logevent:withResolver:withRejecter:)
39
+ func logevent(args: Dictionary<String,Any>?, resolve:@escaping RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) -> Void {
40
+ let event = args?["event"] as? String ?? ""
41
+ print(event)
42
+
43
+
44
+ }
45
+
46
+
47
+ @objc(checkiospermission:withResolver:withRejecter:)
48
+ func checkiospermission(args: Dictionary<String,Any>?, resolve:@escaping RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) -> Void {
49
+ AVCaptureDevice.requestAccess(for: AVMediaType.video) { response in
50
+ if response {
51
+ resolve("true")
52
+
53
+ } else {
54
+ resolve("false")
55
+ }
56
+ }
57
+ }
58
+
59
+ @objc(checkpermissiongranted:withResolver:withRejecter:)
60
+ func checkpermissiongranted(args: Dictionary<String,Any>?, resolve:@escaping RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) -> Void {
61
+ if AVCaptureDevice.authorizationStatus(for: AVMediaType.video) == AVAuthorizationStatus.authorized {
62
+ resolve("true")
63
+ } else {
64
+ resolve("false")
65
+ }
15
66
  }
16
67
 
68
+
69
+
17
70
  @objc(startliveness3d:withResolver:withRejecter:)
18
- func startliveness3D(appKey: String, resolve:@escaping RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) -> Void {
71
+ func startliveness3D(args: Dictionary<String,Any>?, resolve:@escaping RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) -> Void {
19
72
  self.resolve = resolve
20
- let APP_KEY = appKey
73
+
74
+
75
+
76
+ let appKey = args?["appkey"] as? String ?? ""
77
+ let baseURL = args?["baseUrl"] as? String ?? certifaceURL
78
+ let environment = args?["environment"] as? String ?? "HML"
79
+ let apparence = args?["apparence"] as? Dictionary<String,Any> ?? nil
80
+ let liveness3Dtext = args?["liveness3Dtext"] as? Dictionary<String,Any> ?? nil
81
+
82
+ let READY_HEADER_1 = liveness3Dtext?["READY_HEADER_1"] as? String ?? ""
83
+ let READY_HEADER_2 = liveness3Dtext?["READY_HEADER_2"] as? String ?? ""
84
+ let READY_MESSAGE_1 = liveness3Dtext?["READY_MESSAGE_1"] as? String ?? ""
85
+ let READY_MESSAGE_2 = liveness3Dtext?["READY_MESSAGE_2"] as? String ?? ""
86
+ let RETRY_HEADER = liveness3Dtext?["RETRY_HEADER"] as? String ?? "Vamos tentar novamente?"
87
+ let READY_BUTTON = liveness3Dtext?["READY_BUTTON"] as? String ?? ""
88
+ let RETRY_BUTTON = liveness3Dtext?["READY_BUTTON"] as? String ?? "Tentar novamente"
89
+ let RETRY_YOUR_PICTURE = liveness3Dtext?["RETRY_YOUR_PICTURE"] as? String ?? "Sua foto"
90
+
91
+ let RETRY_MESSAGE_SMILE = liveness3Dtext?["RETRY_MESSAGE_SMILE"] as? String ?? "Expressão Neutra, Sem Sorrir"
92
+ let RETRY_MESSAGE_LIGHTING = liveness3Dtext?["RETRY_MESSAGE_LIGHTING"] as? String ?? "Evite reflexos e iluminação extrema."
93
+ let RETRY_MESSAGE_CONTRAST = liveness3Dtext?["RETRY_MESSAGE_CONTRAST"] as? String ?? "Limpe Sua Câmera"
94
+ let RETRY_IDEAL_PICTURE = liveness3Dtext?["RETRY_IDEAL_PICTURE"] as? String ?? ""
95
+ let RETRY_SUBHEADER = liveness3Dtext?["RETRY_SUBHEADER"] as? String ?? "Siga o exemplo de foto ideal abaixo:"
96
+
97
+ let FEEDBACK_FRAME_YOUR_FACE = liveness3Dtext?["FEEDBACK_FRAME_YOUR_FACE"] as? String ?? ""
98
+ let FEEDBACK_HOLD_STEADY_1 = liveness3Dtext?["FEEDBACK_HOLD_STEADY_1"] as? String ?? ""
99
+ let FEEDBACK_HOLD_STEADY_2 = liveness3Dtext?["FEEDBACK_HOLD_STEADY_2"] as? String ?? ""
100
+ let FEEDBACK_HOLD_STEADY_3 = liveness3Dtext?["FEEDBACK_HOLD_STEADY_3"] as? String ?? ""
101
+
102
+ let FEEDBACK_CENTER_FACE = liveness3Dtext?["FEEDBACK_CENTER_FACE"] as? String ?? ""
103
+
104
+
105
+
106
+ let backgroundColor = apparence?["backgroundColor"] as? String ?? ""
107
+ let loadingColor = apparence?["loadingColor"] as? String ?? ""
108
+
109
+
110
+ //FaceTec Texts
111
+ var textsFT = ["FaceTec_accessibility_cancel_button": "Cancelar",
112
+ "FaceTec_accessibility_torch_button": "Ligar flash",
113
+ "FaceTec_action_ok": "OK",
114
+ "FaceTec_action_im_ready": READY_BUTTON,
115
+ "FaceTec_action_try_again": RETRY_BUTTON,
116
+ "FaceTec_action_continue": "Continuar2",
117
+ "FaceTec_action_take_photo": "Tirar Foto",
118
+ "FaceTec_action_accept_photo": "Aceitar",
119
+ "FaceTec_action_confirm": "Confirmação das informações",
120
+ "FaceTec_camera_permission_header": "Habilite a Camera",
121
+ "FaceTec_feedback_center_face": FEEDBACK_CENTER_FACE,
122
+ "FaceTec_feedback_face_not_found": "Enquadre o Seu Rosto",
123
+ "FaceTec_feedback_face_not_looking_straight_ahead": "Olhe Para Frente",
124
+ "FaceTec_feedback_face_not_upright": "Mantenha a Cabeça Reta",
125
+ "FaceTec_feedback_hold_steady": "Segure Firme",
126
+ "FaceTec_feedback_move_phone_away": "2Afaste-se2",
127
+ "FaceTec_feedback_move_phone_closer":"2Aproxime-se2",
128
+ "FaceTec_feedback_move_phone_to_eye_level":"Telefone ao Nível dos Olhos",
129
+ "FaceTec_feedback_use_even_lighting":"Ilumine Seu Rosto Uniformemente",
130
+ "FaceTec_idscan_type_selection_header":"Prepare to Scan\nYour ID Document",
131
+ "FaceTec_instructions_header_ready_1": READY_HEADER_1,
132
+ "FaceTec_instructions_header_ready_2": READY_HEADER_2,
133
+ "FaceTec_instructions_message_ready_1": READY_MESSAGE_1,
134
+ "FaceTec_instructions_message_ready_2": READY_MESSAGE_2,
135
+ "FaceTec_presession_frame_your_face": FEEDBACK_FRAME_YOUR_FACE,
136
+ "FaceTec_presession_position_face_straight_in_oval":"Olhe Para Frente",
137
+ "FaceTec_presession_hold_steady_3": FEEDBACK_HOLD_STEADY_3,
138
+ "FaceTec_presession_hold_steady_2": FEEDBACK_HOLD_STEADY_2,
139
+ "FaceTec_presession_hold_steady_1": FEEDBACK_HOLD_STEADY_1,
140
+ "FaceTec_presession_eyes_straight_ahead":"Olhe Para Frente",
141
+ "FaceTec_presession_remove_dark_glasses":"Tire Seus Óculos de Sol",
142
+ "FaceTec_presession_neutral_expression":"Fique Neutro, Não Sorria",
143
+ "FaceTec_presession_conditions_too_bright":"Ambiente Muito Iluminado",
144
+ "FaceTec_presession_brighten_your_environment":"Ambiente Muito Escuro",
145
+ "FaceTec_result_facescan_upload_message":"",
146
+ "FaceTec_result_success_message":"Tudo certo!",
147
+ "FaceTec_result_idscan_unsuccess_message":"Não foi possível concluir sua verificação.",
148
+ "FaceTec_retry_header": RETRY_HEADER,
149
+ "FaceTec_retry_subheader_message": RETRY_SUBHEADER,
150
+ "FaceTec_retry_instruction_message_1": RETRY_MESSAGE_SMILE,
151
+ "FaceTec_retry_instruction_message_2": RETRY_MESSAGE_LIGHTING,
152
+ "FaceTec_retry_instruction_message_3": RETRY_MESSAGE_CONTRAST,
153
+ "FaceTec_retry_your_image_label": RETRY_YOUR_PICTURE,
154
+ "FaceTec_retry_ideal_image_label": RETRY_IDEAL_PICTURE];
155
+
156
+ var theme = Liveness3DTheme(Liveness3DThemeType.light)
157
+ theme.ovarCustomizationStrokeColor = UIColor(red: 0.9137, green: 0.3216, blue: 0.149, alpha: 1.0)
158
+ theme.ovarCustomizationProgressColor1 = UIColor(red: 0.9137, green: 0.3216, blue: 0.149, alpha: 1.0)
159
+ theme.ovarCustomizationProgressColor2 = UIColor(red: 0.9137, green: 0.3216, blue: 0.149, alpha: 1.0)
160
+ theme.guidanceCustomizationButtonBackgroundNormalColor = UIColor(red: 0.9137, green: 0.3216, blue: 0.149, alpha: 1.0)
161
+ theme.guidanceCustomizationButtonBackgroundHighlightColor = UIColor(red: 0.9137, green: 0.3216, blue: 0.149, alpha: 1.0)
162
+ theme.guidanceCustomizationButtonBackgroundDisabledColor = UIColor(red: 0.9137, green: 0.3216, blue: 0.149, alpha: 0.5)
21
163
 
22
164
  let liveness3DUser = Liveness3DUser(
23
- appKey: APP_KEY,
165
+ appKey: appKey,
24
166
  environment: .HML
25
167
  )
26
168
 
27
- DispatchQueue.main.async {
28
- let liveness3DViewController = HybridLiveness3DViewController(
29
- liveness3DUser: liveness3DUser,
30
- delegate: self
169
+ /* if(environment == "PRD"){
170
+ let liveness3DUser = Liveness3DUser(
171
+ appKey: appKey,
172
+ environment: .PRD,
173
+ defaultTheme: theme,
174
+ lowLightTheme: theme,
175
+ texts: textsFT
31
176
  )
32
- liveness3DViewController.modalPresentationStyle = .fullScreen
33
- RCTPresentedViewController()?.present(liveness3DViewController, animated: true)
177
+
34
178
  }
179
+ */
180
+ AVCaptureDevice.requestAccess(for: AVMediaType.video) { response in
181
+ if response {
182
+ //access granted
183
+ DispatchQueue.main.async {
184
+ let initTheme = HybridViewAppearance(
185
+ backgroundColor: .init(hex: backgroundColor),
186
+ loadingColor:.init(hex: loadingColor)
187
+ )
188
+
189
+ let liveness3DViewController = HybridLiveness3DViewController(
190
+ liveness3DUser: liveness3DUser,
191
+ delegate: self,
192
+ customAppearance: initTheme
193
+ )
194
+ liveness3DViewController.modalPresentationStyle = .fullScreen
195
+ RCTPresentedViewController()?.present(liveness3DViewController, animated: true)
196
+ }
197
+ } else {
198
+ resolve("RESULT_CANCELED")
199
+ }
200
+ }
201
+
202
+
203
+ }
204
+ }
205
+
206
+ public extension UIColor {
207
+
208
+ convenience init(hex: String) {
209
+ var cString: String = hex.trimmingCharacters(in: .whitespacesAndNewlines).uppercased()
210
+
211
+ if cString.hasPrefix("#") {
212
+ cString.remove(at: cString.startIndex)
213
+ }
214
+
215
+ if cString.count != 6 {
216
+ self.init(red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0)
217
+ }
218
+
219
+ var rgbValue: UInt64 = 0
220
+ Scanner(string: cString).scanHexInt64(&rgbValue)
221
+
222
+ self.init(
223
+ red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
224
+ green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
225
+ blue: CGFloat(rgbValue & 0x0000FF) / 255.0,
226
+ alpha: 1.0
227
+ )
35
228
  }
36
229
  }
@@ -28,6 +28,7 @@
28
28
  134814201AA4EA6300B7C361 /* libRnLiveness3d.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRnLiveness3d.a; sourceTree = BUILT_PRODUCTS_DIR; };
29
29
  8E1566ED421C8D7B743E92EE /* Pods-RnLiveness3d.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RnLiveness3d.debug.xcconfig"; path = "Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d.debug.xcconfig"; sourceTree = "<group>"; };
30
30
  B3E7B5891CC2AC0600A0062D /* RnLiveness3d.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RnLiveness3d.m; sourceTree = "<group>"; };
31
+ E87784D929FA8BDB003B8C90 /* info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = info.plist; sourceTree = "<group>"; };
31
32
  F4FF95D5245B92E700C19C63 /* RnLiveness3d-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RnLiveness3d-Bridging-Header.h"; sourceTree = "<group>"; };
32
33
  F4FF95D6245B92E800C19C63 /* RnLiveness3d.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RnLiveness3d.swift; sourceTree = "<group>"; };
33
34
  F9437267F5654BF2D7E973CF /* Pods_RnLiveness3d.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RnLiveness3d.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -64,6 +65,7 @@
64
65
  58B511D21A9E6C8500147676 = {
65
66
  isa = PBXGroup;
66
67
  children = (
68
+ E87784D929FA8BDB003B8C90 /* info.plist */,
67
69
  F4FF95D6245B92E800C19C63 /* RnLiveness3d.swift */,
68
70
  B3E7B5891CC2AC0600A0062D /* RnLiveness3d.m */,
69
71
  F4FF95D5245B92E700C19C63 /* RnLiveness3d-Bridging-Header.h */,
@@ -79,7 +81,6 @@
79
81
  8E1566ED421C8D7B743E92EE /* Pods-RnLiveness3d.debug.xcconfig */,
80
82
  0C6F69B2E2D5C79297667B24 /* Pods-RnLiveness3d.release.xcconfig */,
81
83
  );
82
- name = Pods;
83
84
  path = Pods;
84
85
  sourceTree = "<group>";
85
86
  };
package/ios/info.plist ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>NSCameraUsageDescription</key>
6
+ <string>camera permission.</string>
7
+ </dict>
8
+ </plist>
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=ArgsType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["@types/ArgsType.ts"],"mappings":""}