@identomat-inc/react-native-identomat 1.0.21 → 1.0.23

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 (73) hide show
  1. package/README.md +3 -6
  2. package/index.js +4 -13
  3. package/ios/Identomat.m +3 -2
  4. package/ios/Identomat.swift +19 -69
  5. package/package.json +1 -1
  6. package/react-native-identomat.podspec +1 -18
  7. package/ios/Frameworks/identomat.framework/Assets.car +0 -0
  8. package/ios/Frameworks/identomat.framework/Headers/identomat-Swift.h +0 -638
  9. package/ios/Frameworks/identomat.framework/Headers/identomat.h +0 -18
  10. package/ios/Frameworks/identomat.framework/Info.plist +0 -0
  11. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/arm.swiftsourceinfo +0 -0
  12. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  13. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/arm64.swiftsourceinfo +0 -0
  14. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/armv7-apple-ios.swiftsourceinfo +0 -0
  15. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/armv7.swiftsourceinfo +0 -0
  16. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm.swiftdoc +0 -0
  17. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm.swiftinterface +0 -1866
  18. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm.swiftmodule +0 -0
  19. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  20. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64-apple-ios.swiftinterface +0 -1947
  21. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  22. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64.swiftdoc +0 -0
  23. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64.swiftinterface +0 -1947
  24. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64.swiftmodule +0 -0
  25. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7-apple-ios.swiftdoc +0 -0
  26. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7-apple-ios.swiftinterface +0 -1866
  27. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7-apple-ios.swiftmodule +0 -0
  28. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7.swiftdoc +0 -0
  29. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7.swiftinterface +0 -1866
  30. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7.swiftmodule +0 -0
  31. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/x86_64.swiftdoc +0 -0
  32. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/x86_64.swiftinterface +0 -1947
  33. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/x86_64.swiftmodule +0 -0
  34. package/ios/Frameworks/identomat.framework/Modules/module.modulemap +0 -11
  35. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/3Qb-Zw-Ydv-view-5fQ-xy-n01.nib/objects-11.0+.nib +0 -0
  36. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/3Qb-Zw-Ydv-view-5fQ-xy-n01.nib/runtime.nib +0 -0
  37. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/Ajy-Ix-fe9-view-G1g-ks-BqP.nib/objects-11.0+.nib +0 -0
  38. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/Ajy-Ix-fe9-view-G1g-ks-BqP.nib/runtime.nib +0 -0
  39. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/Info.plist +0 -0
  40. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/RiD-hj-AH5-view-oaZ-g7-pTv.nib/objects-11.0+.nib +0 -0
  41. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/RiD-hj-AH5-view-oaZ-g7-pTv.nib/runtime.nib +0 -0
  42. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/VAA-Ss-lbh-view-UDO-8x-V4i.nib/objects-11.0+.nib +0 -0
  43. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/VAA-Ss-lbh-view-UDO-8x-V4i.nib/runtime.nib +0 -0
  44. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/YyM-f0-UbG-view-INz-ta-t1c.nib/objects-11.0+.nib +0 -0
  45. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/YyM-f0-UbG-view-INz-ta-t1c.nib/runtime.nib +0 -0
  46. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/agreement_view.nib/objects-11.0+.nib +0 -0
  47. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/agreement_view.nib/runtime.nib +0 -0
  48. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/default_view_controller.nib/objects-11.0+.nib +0 -0
  49. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/default_view_controller.nib/runtime.nib +0 -0
  50. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/document_types_view.nib/objects-11.0+.nib +0 -0
  51. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/document_types_view.nib/runtime.nib +0 -0
  52. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/fQF-H1-pI2-view-oqs-SO-IYK.nib/objects-11.0+.nib +0 -0
  53. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/fQF-H1-pI2-view-oqs-SO-IYK.nib/runtime.nib +0 -0
  54. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/liveness_view.nib/objects-11.0+.nib +0 -0
  55. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/liveness_view.nib/runtime.nib +0 -0
  56. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/match_photo_view.nib/objects-11.0+.nib +0 -0
  57. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/match_photo_view.nib/runtime.nib +0 -0
  58. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/qkz-dS-cJe-view-KRp-Px-e4R.nib/objects-11.0+.nib +0 -0
  59. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/qkz-dS-cJe-view-KRp-Px-e4R.nib/runtime.nib +0 -0
  60. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/scan_document_view.nib/objects-11.0+.nib +0 -0
  61. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/scan_document_view.nib/runtime.nib +0 -0
  62. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_file_view.nib/objects-11.0+.nib +0 -0
  63. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_file_view.nib/runtime.nib +0 -0
  64. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_types_view.nib/objects-11.0+.nib +0 -0
  65. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_types_view.nib/runtime.nib +0 -0
  66. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/vTZ-J7-KVA-view-nnL-sn-lBz.nib/objects-11.0+.nib +0 -0
  67. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/vTZ-J7-KVA-view-nnL-sn-lBz.nib/runtime.nib +0 -0
  68. package/ios/Frameworks/identomat.framework/_CodeSignature/CodeResources +0 -1045
  69. package/ios/Frameworks/identomat.framework/en.lproj/languages.strings +0 -0
  70. package/ios/Frameworks/identomat.framework/es.lproj/languages.strings +0 -0
  71. package/ios/Frameworks/identomat.framework/identomat +0 -0
  72. package/ios/Frameworks/identomat.framework/ka.lproj/languages.strings +0 -0
  73. package/ios/Frameworks/identomat.framework/ru.lproj/languages.strings +0 -0
package/README.md CHANGED
@@ -7,13 +7,11 @@
7
7
 
8
8
 
9
9
  #### iOS
10
-
11
- 1. If you don't use swift, you need create empty swift file with bridging header in you ios project
12
- 2. run pod install in you ios project
10
+ 1. run pod install in you ios directory
13
11
 
14
12
  #### Android
15
13
 
16
- 1. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
14
+ 1. Insert the following lines inside the dependencies block in `android/build.gradle`:
17
15
  ```
18
16
  allprojects {
19
17
  repositories {
@@ -34,10 +32,9 @@
34
32
  class Callback {
35
33
  callback() {
36
34
  console.log('finished')
37
-
38
35
  }
39
36
  }
40
- identomat.setCallBack(new Callback())
37
+ identomat.setCallback(new Callback())
41
38
  identomat.setBaseUrl(config.baseUrl);
42
39
  identomat.start(config.sessionKey);
43
40
 
package/index.js CHANGED
@@ -12,31 +12,22 @@ class Identomat {
12
12
  if(Platform.OS == "android"){
13
13
  NativeModules.BridgeModule.setBaseUrl(baseUrl);
14
14
  }else if(Platform.OS == "ios"){
15
- NativeModules.Identomat.start(JSON.stringify(identomatConfig),
16
- sessionKey,
17
- );
15
+ NativeModules.Identomat.setBaseUrl(baseUrl);
18
16
  }
19
17
  }
20
-
21
18
  async start(sessionKey) {
22
19
  if(Platform.OS == "android"){
23
20
  NativeModules.BridgeModule.start(sessionKey);
24
21
  }else if(Platform.OS == "ios"){
25
- console.log(NativeModules.Identomat)
26
-
27
-
28
- NativeModules.Identomat.start(JSON.stringify(identomatConfig),
29
- sessionKey,
30
- );
22
+ NativeModules.Identomat.start(sessionKey);
31
23
  }
32
24
  }
33
-
34
25
  setCallback(Callback){
35
26
  if (Platform.OS=="android"){
36
27
  BatchedBridge.registerCallableModule('JavaScriptVisibleToJava', Callback);
37
28
  }else if(Platform.OS=="ios"){
38
- NativeModules.Identomat.callBack(function(error,data){
39
- resultClass.getResult(sessionId)
29
+ NativeModules.Identomat.callback(function(error,data){
30
+ Callback.callback()
40
31
  })
41
32
  }
42
33
  }
package/ios/Identomat.m CHANGED
@@ -19,8 +19,9 @@
19
19
  #import <React/RCTBridgeModule.h>
20
20
 
21
21
  @interface RCT_EXTERN_MODULE(Identomat, NSObject)
22
- RCT_EXTERN_METHOD(start:(NSString *)identomatConfig withSession: (NSString *)sessionId)
23
- RCT_EXTERN_METHOD(callBack: (RCTResponseSenderBlock *)successCallback)
22
+ RCT_EXTERN_METHOD(start: (NSString *)sessionId)
23
+ RCT_EXTERN_METHOD(setBaseUrl: (NSString *)baseUrl)
24
+ RCT_EXTERN_METHOD(callback: (RCTResponseSenderBlock *)successCallback)
24
25
  @end
25
26
 
26
27
 
@@ -13,46 +13,23 @@ import identomat
13
13
  @objc(Identomat)
14
14
 
15
15
  class Identomat: NSObject, RCTBridgeModule{
16
-
17
- static func moduleName() -> String!{
18
- return "Identomat";
19
- }
20
-
21
- static func requirement () -> Bool {
22
- return true;
23
- }
24
-
16
+
17
+ static func moduleName() -> String!{
18
+ return "Identomat";
19
+ }
20
+
21
+ static func requirement () -> Bool {
22
+ return true;
23
+ }
24
+
25
25
  var successCallback: RCTResponseSenderBlock? = nil;
26
-
27
- @objc
28
- func start(_ identomatConfig:String, withSession sessionId : String) -> Void {
26
+
27
+ @objc
28
+ func start(_ sessionId : String) -> Void {
29
29
  DispatchQueue.main.async {
30
30
 
31
31
  let topController = UIApplication.topViewController()
32
- let data: Data? = identomatConfig.data(using: .utf8)
33
- let json = (try? JSONSerialization.jsonObject(with: data!, options: [])) as! [String:Any]
34
-
35
- let flags = json["flags"] as! [String : Any]
36
- let documentTypes = self.parseDocuments(documentTypes: json["docTypes"] as! [String:Any])
37
-
38
- IdentomatManager.getInstance().setUp(token: sessionId, flags: flags, documentTypes: documentTypes)
39
- if let color = json["colors"] as? [String : String]{
40
- IdentomatManager.getInstance().setColors(color: color)
41
- }
42
- if let strings = json["strings"] as? [String : Any?]{
43
- IdentomatManager.getInstance().setStrings(dict: strings)
44
- }
45
- if let fonts = json["fonts"] as? [String : Any?]{
46
- if let head1 = fonts["Head1Font"] as? String{
47
- IdentomatManager.getInstance().setHead1Font(fontname: head1)
48
- }
49
- if let head2 = fonts["Head2Font"] as? String{
50
- IdentomatManager.getInstance().setHead2Font(fontname: head2)
51
- }
52
- if let body = fonts["BodyFont"] as? String{
53
- IdentomatManager.getInstance().setBodyFont(fontname: body)
54
- }
55
- }
32
+ IdentomatManager.getInstance().setUp(token: sessionId)
56
33
  //start identomat
57
34
  let identomatView = IdentomatManager.getInstance().getIdentomatView()
58
35
  identomatView.modalPresentationStyle = .fullScreen
@@ -61,7 +38,11 @@ class Identomat: NSObject, RCTBridgeModule{
61
38
  }
62
39
  }
63
40
  @objc
64
- func callBack(_ successCallback: @escaping RCTResponseSenderBlock){
41
+ func setBaseUrl(_ baseUrl : String) -> Void {
42
+ IdentomatManager.getInstance().setBaseUrl(url: baseUrl)
43
+ }
44
+ @objc
45
+ func callback(_ successCallback: @escaping RCTResponseSenderBlock){
65
46
  self.successCallback = successCallback;
66
47
  IdentomatManager.getInstance().callBack {
67
48
  print("process is done we are good")
@@ -69,39 +50,8 @@ class Identomat: NSObject, RCTBridgeModule{
69
50
  }
70
51
 
71
52
  }
72
-
73
- func parseDocuments(documentTypes : [String:Any]) -> [Int]{
74
- var docTypes : [Int] = []
75
- if let documentCard = documentTypes["id_card"] as? Bool{
76
- if(documentCard){
77
- docTypes.append(Document.CARD)
78
- }
79
- }
80
- if let documentPassport = documentTypes["passport"] as? Bool{
81
- if(documentPassport){
82
- docTypes.append(Document.PASSPORT)
83
- }
84
- }
85
- if let documentLicense = documentTypes["driving_license"] as? Bool{
86
- if(documentLicense){
87
- docTypes.append(Document.LICENSE)
88
- }
89
- }
90
- if let documentResidence = documentTypes["residence_permit"] as? Bool{
91
- if(documentResidence){
92
- docTypes.append(Document.RESIDENCE)
93
- }
94
- }
95
- return docTypes
96
- }
97
-
98
- }
99
- class Document {
100
- public static let CARD : Int = 0
101
- public static let LICENSE : Int = 1
102
- public static let RESIDENCE : Int = 2
103
- public static let PASSPORT : Int = 3
104
53
  }
54
+
105
55
 
106
56
 
107
57
  extension UIApplication {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@identomat-inc/react-native-identomat",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "identomat bridge module",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,24 +21,7 @@ Pod::Spec.new do |s|
21
21
  s.source_files = "ios/**/*.{h,c,m,swift}"
22
22
  s.swift_version = "5"
23
23
  s.requires_arc = true
24
-
25
- #.dependency = 'Frameworks/identomat.framework'
26
-
27
- s.vendored_frameworks = 'ios/Frameworks/identomat.framework'
28
- s.preserve_path = 'ios/Frameworks/'
29
24
  s.dependency "React"
30
-
31
- # s.subspec 'identomat' do |df|
32
- # df.source_files = "Frameworks/**/*.swift"
33
- # end
34
-
35
- # s.subspec 'Core' do |core|
36
- # core.source_files = "Core/**/*.swift"
37
- # core.dependency 'Core/DependencyFramework'
38
- # end
39
-
40
-
41
- # .
42
- # s.dependency "..."
25
+ s.dependency "identomat-inc"
43
26
  end
44
27