assentify-sdk-react-native 0.0.11 → 0.0.13

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 CHANGED
@@ -92,6 +92,15 @@ yarn add assentify-sdk-react-native
92
92
  ```
93
93
 
94
94
  ## Versions
95
+ **0.0.13**
96
+ - Fixes
97
+
98
+ **0.0.12**
99
+ - Face match improvements
100
+
101
+ **0.0.11**
102
+ - UI Fixes
103
+
95
104
  **0.0.10**
96
105
  - Face events threshold improvements
97
106
 
@@ -370,7 +370,9 @@ class AssentifySdkModule(context: ReactApplicationContext) :
370
370
  submitRequestList.add(sharedStepDefinitionsStepFace)
371
371
  submitRequestList.add(wrapUp!!)
372
372
  submitRequestList.add(blockLoader!!)
373
- submitRequestList.add(contextAwareSigningModel!!)
373
+ if(contextAwareSigningModel !=null){
374
+ submitRequestList.add(contextAwareSigningModel!!)
375
+ }
374
376
 
375
377
 
376
378
 
@@ -19,6 +19,7 @@ class FaceMAtchController: UIViewController ,FaceMatchDelegate
19
19
  private var holdHandColor: String;
20
20
  private var processingColor: String;
21
21
  private var showCountDown: Bool = true;
22
+ private var faceMatch: FaceMatch?;
22
23
 
23
24
  init(assentifySdk: AssentifySdk, nativeAssentifySdk:NativeAssentifySdk?,holdHandColor: String,processingColor: String,secondImage:String,showCountDown:Bool) {
24
25
  self.assentifySdk = assentifySdk
@@ -44,17 +45,17 @@ class FaceMAtchController: UIViewController ,FaceMatchDelegate
44
45
  self.view.backgroundColor = .clear
45
46
  UIApplication.shared.isStatusBarHidden = false;
46
47
  DispatchQueue.main.async {
47
- var faceMatch = self.assentifySdk?.startFaceMatch(faceMatchDelegate: self, secondImage: self.secondImage,showCountDown:self.showCountDown)
48
- self.addChild(faceMatch!)
49
- self.view.addSubview(faceMatch!.view)
50
- faceMatch!.view.translatesAutoresizingMaskIntoConstraints = false
48
+ self.faceMatch = self.assentifySdk?.startFaceMatch(faceMatchDelegate: self, secondImage: self.secondImage,showCountDown:self.showCountDown)
49
+ self.addChild( self.faceMatch!)
50
+ self.view.addSubview( self.faceMatch!.view)
51
+ self.faceMatch!.view.translatesAutoresizingMaskIntoConstraints = false
51
52
  NSLayoutConstraint.activate([
52
- faceMatch!.view.topAnchor.constraint(equalTo: self.view.topAnchor,constant: 0),
53
- faceMatch!.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor),
54
- faceMatch!.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor),
55
- faceMatch!.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor),
53
+ self.faceMatch!.view.topAnchor.constraint(equalTo: self.view.topAnchor,constant: 0),
54
+ self.faceMatch!.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor),
55
+ self.faceMatch!.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor),
56
+ self.faceMatch!.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor),
56
57
  ])
57
- faceMatch!.didMove(toParent: self)
58
+ self.faceMatch!.didMove(toParent: self)
58
59
  (self.infoLabel, self.infoImage) = showInfo(view: self.view, text: "Please face within circle",initialTextColorHex:self.processingColor,initialBackgroundColorHex:self.holdHandColor,initialImageName:"info_icon")
59
60
  showNavigationBarWithBackArrow(view: self.view, target: self, action: #selector(self.backButtonTapped), initialTextColorHex:self.processingColor,initialBackgroundColorHex:self.holdHandColor,title: "Face Capture")
60
61
  }
@@ -62,6 +63,10 @@ class FaceMAtchController: UIViewController ,FaceMatchDelegate
62
63
  @objc func backButtonTapped() {
63
64
  triggerEvent(eventName:"onBackClick",dataModel:nil)
64
65
  DispatchQueue.main.async {
66
+ self.faceMatch?.willMove(toParent: nil)
67
+ self.faceMatch?.view.removeFromSuperview()
68
+ self.faceMatch?.removeFromParent()
69
+ self.faceMatch = nil
65
70
  self.dismiss(animated: false)
66
71
  }
67
72
  }
@@ -69,6 +74,10 @@ class FaceMAtchController: UIViewController ,FaceMatchDelegate
69
74
  func dismissParentViewController() {
70
75
  triggerEvent(eventName:"onBackClick",dataModel:nil)
71
76
  DispatchQueue.main.async {
77
+ self.faceMatch?.willMove(toParent: nil)
78
+ self.faceMatch?.view.removeFromSuperview()
79
+ self.faceMatch?.removeFromParent()
80
+ self.faceMatch = nil
72
81
  self.dismiss(animated: false)
73
82
  }
74
83
 
@@ -146,6 +155,10 @@ class FaceMAtchController: UIViewController ,FaceMatchDelegate
146
155
  triggerCompleteEvent(eventName:"onComplete",dataModel:dataModel.faceExtractedModel)
147
156
 
148
157
  DispatchQueue.main.async {
158
+ self.faceMatch?.willMove(toParent: nil)
159
+ self.faceMatch?.view.removeFromSuperview()
160
+ self.faceMatch?.removeFromParent()
161
+ self.faceMatch = nil
149
162
  self.dismiss(animated: false)
150
163
  }
151
164
  }
@@ -23,7 +23,7 @@ class IDCardController: UIViewController ,ScanIDCardDelegate , ChildViewControll
23
23
  private var titleID:String? = "";
24
24
  private var nativeAssentifySdk:NativeAssentifySdk?;
25
25
  private var outputResultProperties: [String: Any]? = [:];
26
-
26
+ private var scanID:ScanIDCard?;
27
27
 
28
28
 
29
29
 
@@ -52,17 +52,17 @@ class IDCardController: UIViewController ,ScanIDCardDelegate , ChildViewControll
52
52
  self.view.backgroundColor = .clear
53
53
  UIApplication.shared.isStatusBarHidden = false;
54
54
  DispatchQueue.main.async {
55
- var scanID = self.assentifySdk?.startScanID(scanIDCardDelegate: self, kycDocumentDetails: self._kycDocumentDetails,language:self.language)
56
- self.addChild(scanID!)
57
- self.view.addSubview(scanID!.view)
58
- scanID!.view.translatesAutoresizingMaskIntoConstraints = false
55
+ self.scanID = self.assentifySdk?.startScanID(scanIDCardDelegate: self, kycDocumentDetails: self._kycDocumentDetails,language:self.language)
56
+ self.addChild( self.scanID!)
57
+ self.view.addSubview( self.scanID!.view)
58
+ self.scanID!.view.translatesAutoresizingMaskIntoConstraints = false
59
59
  NSLayoutConstraint.activate([
60
- scanID!.view.topAnchor.constraint(equalTo: self.view.topAnchor,constant: 0),
61
- scanID!.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor),
62
- scanID!.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor),
63
- scanID!.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor),
60
+ self.scanID!.view.topAnchor.constraint(equalTo: self.view.topAnchor,constant: 0),
61
+ self.scanID!.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor),
62
+ self.scanID!.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor),
63
+ self.scanID!.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor),
64
64
  ])
65
- scanID!.didMove(toParent: self)
65
+ self.scanID!.didMove(toParent: self)
66
66
  (self.infoLabel, self.infoImage) = showInfo(view: self.view, text: "Please Present Your ID",initialTextColorHex:self.processingColor,initialBackgroundColorHex:self.holdHandColor,initialImageName:"info_icon")
67
67
  showNavigationBarWithBackArrow(view: self.view, target: self, action: #selector(self.backButtonTapped), initialTextColorHex:self.processingColor,initialBackgroundColorHex:self.holdHandColor,title: self.titleID!)
68
68
  }
@@ -70,14 +70,22 @@ class IDCardController: UIViewController ,ScanIDCardDelegate , ChildViewControll
70
70
  @objc func backButtonTapped() {
71
71
  triggerEvent(eventName:"onBackClick",dataModel:nil)
72
72
  DispatchQueue.main.async {
73
- self.dismiss(animated: false)
73
+ self.scanID?.willMove(toParent: nil)
74
+ self.scanID?.view.removeFromSuperview()
75
+ self.scanID?.removeFromParent()
76
+ self.scanID = nil
77
+ self.dismiss(animated: false)
74
78
  }
75
79
  }
76
80
 
77
81
  func dismissParentViewController() {
78
82
  triggerEvent(eventName:"onBackClick",dataModel:nil)
79
83
  DispatchQueue.main.async {
80
- self.dismiss(animated: false)
84
+ self.scanID?.willMove(toParent: nil)
85
+ self.scanID?.view.removeFromSuperview()
86
+ self.scanID?.removeFromParent()
87
+ self.scanID = nil
88
+ self.dismiss(animated: false)
81
89
  }
82
90
 
83
91
  }
@@ -174,7 +182,11 @@ class IDCardController: UIViewController ,ScanIDCardDelegate , ChildViewControll
174
182
  UserDefaults.standard.set(outputProperties, forKey: "OutputPropertiesDoc")
175
183
  }
176
184
  DispatchQueue.main.async {
177
- self.dismiss(animated: false)
185
+ self.scanID?.willMove(toParent: nil)
186
+ self.scanID?.view.removeFromSuperview()
187
+ self.scanID?.removeFromParent()
188
+ self.scanID = nil
189
+ self.dismiss(animated: false)
178
190
  }
179
191
 
180
192
 
@@ -22,6 +22,7 @@ class OtherController: UIViewController ,ScanOtherDelegate , ChildViewController
22
22
  private var language: String;
23
23
  private var apiKey: String;
24
24
  private var nativeAssentifySdk:NativeAssentifySdk?;
25
+ private var scanOther:ScanOther?;
25
26
 
26
27
 
27
28
 
@@ -50,17 +51,17 @@ class OtherController: UIViewController ,ScanOtherDelegate , ChildViewController
50
51
  self.view.backgroundColor = .clear
51
52
  UIApplication.shared.isStatusBarHidden = false;
52
53
  DispatchQueue.main.async {
53
- var scanOther = self.assentifySdk?.startScanOthers(scanOtherDelegate: self,language:self.language)
54
- self.addChild(scanOther!)
55
- self.view.addSubview(scanOther!.view)
56
- scanOther!.view.translatesAutoresizingMaskIntoConstraints = false
54
+ self.scanOther = self.assentifySdk?.startScanOthers(scanOtherDelegate: self,language:self.language)
55
+ self.addChild( self.scanOther!)
56
+ self.view.addSubview( self.scanOther!.view)
57
+ self.scanOther!.view.translatesAutoresizingMaskIntoConstraints = false
57
58
  NSLayoutConstraint.activate([
58
- scanOther!.view.topAnchor.constraint(equalTo: self.view.topAnchor,constant: 0),
59
- scanOther!.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor),
60
- scanOther!.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor),
61
- scanOther!.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor),
59
+ self.scanOther!.view.topAnchor.constraint(equalTo: self.view.topAnchor,constant: 0),
60
+ self.scanOther!.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor),
61
+ self.scanOther!.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor),
62
+ self.scanOther!.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor),
62
63
  ])
63
- scanOther!.didMove(toParent: self)
64
+ self.scanOther!.didMove(toParent: self)
64
65
  (self.infoLabel, self.infoImage) = showInfo(view: self.view, text: "Please Present Your ID",initialTextColorHex:self.processingColor,initialBackgroundColorHex:self.holdHandColor,initialImageName:"info_icon")
65
66
  showNavigationBarWithBackArrow(view: self.view, target: self, action: #selector(self.backButtonTapped), initialTextColorHex:self.processingColor,initialBackgroundColorHex:self.holdHandColor,title: "ID Capture")
66
67
 
@@ -69,14 +70,22 @@ class OtherController: UIViewController ,ScanOtherDelegate , ChildViewController
69
70
  @objc func backButtonTapped() {
70
71
  triggerEvent(eventName:"onBackClick",dataModel:nil)
71
72
  DispatchQueue.main.async {
72
- self.dismiss(animated: false)
73
+ self.scanOther?.willMove(toParent: nil)
74
+ self.scanOther?.view.removeFromSuperview()
75
+ self.scanOther?.removeFromParent()
76
+ self.scanOther = nil
77
+ self.dismiss(animated: false)
73
78
  }
74
79
  }
75
80
 
76
81
  func dismissParentViewController() {
77
82
  triggerEvent(eventName:"onBackClick",dataModel:nil)
78
83
  DispatchQueue.main.async {
79
- self.dismiss(animated: false)
84
+ self.scanOther?.willMove(toParent: nil)
85
+ self.scanOther?.view.removeFromSuperview()
86
+ self.scanOther?.removeFromParent()
87
+ self.scanOther = nil
88
+ self.dismiss(animated: false)
80
89
  }
81
90
 
82
91
  }
@@ -152,7 +161,11 @@ class OtherController: UIViewController ,ScanOtherDelegate , ChildViewController
152
161
  }
153
162
  triggerCompleteEvent(eventName:"onComplete",dataModel:dataModel.otherExtractedModel)
154
163
  DispatchQueue.main.async {
155
- self.dismiss(animated: false)
164
+ self.scanOther?.willMove(toParent: nil)
165
+ self.scanOther?.view.removeFromSuperview()
166
+ self.scanOther?.removeFromParent()
167
+ self.scanOther = nil
168
+ self.dismiss(animated: false)
156
169
  }
157
170
 
158
171
  }
@@ -21,6 +21,7 @@ class PassportController: UIViewController ,ScanPassportDelegate , ChildViewCont
21
21
  private var language: String;
22
22
  private var showCountDown: Bool = true;
23
23
  private var apiKey: String? = "";
24
+ private var scanPassport: ScanPassport?;
24
25
 
25
26
 
26
27
 
@@ -51,17 +52,17 @@ class PassportController: UIViewController ,ScanPassportDelegate , ChildViewCont
51
52
  self.view.backgroundColor = .clear
52
53
  UIApplication.shared.isStatusBarHidden = false;
53
54
  DispatchQueue.main.async {
54
- var scanPassport = self.assentifySdk?.startScanPassport(scanPassportDelegate: self,language: self.language)
55
- self.addChild(scanPassport!)
56
- self.view.addSubview(scanPassport!.view)
57
- scanPassport!.view.translatesAutoresizingMaskIntoConstraints = false
55
+ self.scanPassport = self.assentifySdk?.startScanPassport(scanPassportDelegate: self,language: self.language)
56
+ self.addChild( self.scanPassport!)
57
+ self.view.addSubview(self.scanPassport!.view)
58
+ self.scanPassport!.view.translatesAutoresizingMaskIntoConstraints = false
58
59
  NSLayoutConstraint.activate([
59
- scanPassport!.view.topAnchor.constraint(equalTo: self.view.topAnchor,constant: 0),
60
- scanPassport!.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor),
61
- scanPassport!.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor),
62
- scanPassport!.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor),
60
+ self.scanPassport!.view.topAnchor.constraint(equalTo: self.view.topAnchor,constant: 0),
61
+ self.scanPassport!.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor),
62
+ self.scanPassport!.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor),
63
+ self.scanPassport!.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor),
63
64
  ])
64
- scanPassport!.didMove(toParent: self)
65
+ self.scanPassport!.didMove(toParent: self)
65
66
  (self.infoLabel, self.infoImage) = showInfo(view: self.view, text: "Please Present Your Passport",initialTextColorHex:self.processingColor,initialBackgroundColorHex:self.holdHandColor,initialImageName:"info_icon")
66
67
  showNavigationBarWithBackArrow(view: self.view, target: self, action: #selector(self.backButtonTapped), initialTextColorHex:self.processingColor,initialBackgroundColorHex:self.holdHandColor,title: "Passport Capture")
67
68
 
@@ -70,14 +71,22 @@ class PassportController: UIViewController ,ScanPassportDelegate , ChildViewCont
70
71
  @objc func backButtonTapped() {
71
72
  triggerEvent(eventName:"onBackClick",dataModel:nil)
72
73
  DispatchQueue.main.async {
73
- self.dismiss(animated: false)
74
+ self.scanPassport?.willMove(toParent: nil)
75
+ self.scanPassport?.view.removeFromSuperview()
76
+ self.scanPassport?.removeFromParent()
77
+ self.scanPassport = nil
78
+ self.dismiss(animated: false)
74
79
  }
75
80
  }
76
81
 
77
82
  func dismissParentViewController() {
78
83
  triggerEvent(eventName:"onBackClick",dataModel:nil)
79
84
  DispatchQueue.main.async {
80
- self.dismiss(animated: false)
85
+ self.scanPassport?.willMove(toParent: nil)
86
+ self.scanPassport?.view.removeFromSuperview()
87
+ self.scanPassport?.removeFromParent()
88
+ self.scanPassport = nil
89
+ self.dismiss(animated: false)
81
90
  }
82
91
 
83
92
  }
@@ -163,6 +172,10 @@ class PassportController: UIViewController ,ScanPassportDelegate , ChildViewCont
163
172
  }
164
173
  triggerCompleteEvent(eventName:"onComplete",dataModel:dataModel.passportExtractedModel)
165
174
  DispatchQueue.main.async {
175
+ self.scanPassport?.willMove(toParent: nil)
176
+ self.scanPassport?.view.removeFromSuperview()
177
+ self.scanPassport?.removeFromParent()
178
+ self.scanPassport = nil
166
179
  self.dismiss(animated: false)
167
180
  }
168
181
  }
@@ -175,6 +188,10 @@ class PassportController: UIViewController ,ScanPassportDelegate , ChildViewCont
175
188
  }
176
189
  triggerCompleteEvent(eventName:"onComplete",dataModel:dataModel.passportExtractedModel)
177
190
  DispatchQueue.main.async {
191
+ self.scanPassport?.willMove(toParent: nil)
192
+ self.scanPassport?.view.removeFromSuperview()
193
+ self.scanPassport?.removeFromParent()
194
+ self.scanPassport = nil
178
195
  self.dismiss(animated: false)
179
196
  }
180
197
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assentify-sdk-react-native",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "This package provides integration with Assentify's services, allowing developers to incorporate Assentify functionalities seamlessly into their applications.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",