assentify-sdk-react-native 0.0.13 → 0.0.14

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,9 @@ yarn add assentify-sdk-react-native
92
92
  ```
93
93
 
94
94
  ## Versions
95
+ **0.0.14**
96
+ - UI Fixes
97
+
95
98
  **0.0.13**
96
99
  - Fixes
97
100
 
@@ -67,6 +67,7 @@ class FaceMAtchController: UIViewController ,FaceMatchDelegate
67
67
  self.faceMatch?.view.removeFromSuperview()
68
68
  self.faceMatch?.removeFromParent()
69
69
  self.faceMatch = nil
70
+ self.closeAllCameras()
70
71
  self.dismiss(animated: false)
71
72
  }
72
73
  }
@@ -78,11 +79,23 @@ class FaceMAtchController: UIViewController ,FaceMatchDelegate
78
79
  self.faceMatch?.view.removeFromSuperview()
79
80
  self.faceMatch?.removeFromParent()
80
81
  self.faceMatch = nil
82
+ self.closeAllCameras()
81
83
  self.dismiss(animated: false)
82
84
  }
83
85
 
84
86
  }
85
87
 
88
+ func closeAllCameras() {
89
+ children.forEach { child in
90
+ if let captureSession = child.value(forKey: "captureSession") as? AVCaptureSession {
91
+ captureSession.stopRunning()
92
+ }
93
+ child.willMove(toParent: nil)
94
+ child.view.removeFromSuperview()
95
+ child.removeFromParent()
96
+ }
97
+ }
98
+
86
99
  @objc func dismissPopUpMessage() {
87
100
  DispatchQueue.main.async {
88
101
  if(!self.start){
@@ -159,6 +172,7 @@ class FaceMAtchController: UIViewController ,FaceMatchDelegate
159
172
  self.faceMatch?.view.removeFromSuperview()
160
173
  self.faceMatch?.removeFromParent()
161
174
  self.faceMatch = nil
175
+ self.closeAllCameras()
162
176
  self.dismiss(animated: false)
163
177
  }
164
178
  }
@@ -74,6 +74,7 @@ class IDCardController: UIViewController ,ScanIDCardDelegate , ChildViewControll
74
74
  self.scanID?.view.removeFromSuperview()
75
75
  self.scanID?.removeFromParent()
76
76
  self.scanID = nil
77
+ self.closeAllCameras();
77
78
  self.dismiss(animated: false)
78
79
  }
79
80
  }
@@ -85,11 +86,24 @@ class IDCardController: UIViewController ,ScanIDCardDelegate , ChildViewControll
85
86
  self.scanID?.view.removeFromSuperview()
86
87
  self.scanID?.removeFromParent()
87
88
  self.scanID = nil
89
+ self.closeAllCameras();
88
90
  self.dismiss(animated: false)
89
91
  }
90
92
 
91
93
  }
92
94
 
95
+ func closeAllCameras() {
96
+ children.forEach { child in
97
+ if let captureSession = child.value(forKey: "captureSession") as? AVCaptureSession {
98
+ captureSession.stopRunning()
99
+ }
100
+ child.willMove(toParent: nil)
101
+ child.view.removeFromSuperview()
102
+ child.removeFromParent()
103
+ }
104
+ }
105
+
106
+
93
107
  @objc func dismissPopUpMessage() {
94
108
  DispatchQueue.main.async {
95
109
  if(!self.start){
@@ -186,6 +200,7 @@ class IDCardController: UIViewController ,ScanIDCardDelegate , ChildViewControll
186
200
  self.scanID?.view.removeFromSuperview()
187
201
  self.scanID?.removeFromParent()
188
202
  self.scanID = nil
203
+ self.closeAllCameras();
189
204
  self.dismiss(animated: false)
190
205
  }
191
206
 
@@ -74,6 +74,7 @@ class OtherController: UIViewController ,ScanOtherDelegate , ChildViewController
74
74
  self.scanOther?.view.removeFromSuperview()
75
75
  self.scanOther?.removeFromParent()
76
76
  self.scanOther = nil
77
+ self.closeAllCameras();
77
78
  self.dismiss(animated: false)
78
79
  }
79
80
  }
@@ -85,11 +86,23 @@ class OtherController: UIViewController ,ScanOtherDelegate , ChildViewController
85
86
  self.scanOther?.view.removeFromSuperview()
86
87
  self.scanOther?.removeFromParent()
87
88
  self.scanOther = nil
89
+ self.closeAllCameras();
88
90
  self.dismiss(animated: false)
89
91
  }
90
92
 
91
93
  }
92
-
94
+
95
+ func closeAllCameras() {
96
+ children.forEach { child in
97
+ if let captureSession = child.value(forKey: "captureSession") as? AVCaptureSession {
98
+ captureSession.stopRunning()
99
+ }
100
+ child.willMove(toParent: nil)
101
+ child.view.removeFromSuperview()
102
+ child.removeFromParent()
103
+ }
104
+ }
105
+
93
106
  @objc func dismissPopUpMessage() {
94
107
  DispatchQueue.main.async {
95
108
  if(!self.start){
@@ -165,6 +178,7 @@ class OtherController: UIViewController ,ScanOtherDelegate , ChildViewController
165
178
  self.scanOther?.view.removeFromSuperview()
166
179
  self.scanOther?.removeFromParent()
167
180
  self.scanOther = nil
181
+ self.closeAllCameras();
168
182
  self.dismiss(animated: false)
169
183
  }
170
184
 
@@ -68,6 +68,9 @@ class PassportController: UIViewController ,ScanPassportDelegate , ChildViewCont
68
68
 
69
69
  }
70
70
  }
71
+
72
+
73
+
71
74
  @objc func backButtonTapped() {
72
75
  triggerEvent(eventName:"onBackClick",dataModel:nil)
73
76
  DispatchQueue.main.async {
@@ -75,6 +78,7 @@ class PassportController: UIViewController ,ScanPassportDelegate , ChildViewCont
75
78
  self.scanPassport?.view.removeFromSuperview()
76
79
  self.scanPassport?.removeFromParent()
77
80
  self.scanPassport = nil
81
+ self.closeAllCameras();
78
82
  self.dismiss(animated: false)
79
83
  }
80
84
  }
@@ -86,11 +90,23 @@ class PassportController: UIViewController ,ScanPassportDelegate , ChildViewCont
86
90
  self.scanPassport?.view.removeFromSuperview()
87
91
  self.scanPassport?.removeFromParent()
88
92
  self.scanPassport = nil
93
+ self.closeAllCameras();
89
94
  self.dismiss(animated: false)
90
95
  }
91
96
 
92
97
  }
93
-
98
+
99
+ func closeAllCameras() {
100
+ children.forEach { child in
101
+ if let captureSession = child.value(forKey: "captureSession") as? AVCaptureSession {
102
+ captureSession.stopRunning()
103
+ }
104
+ child.willMove(toParent: nil)
105
+ child.view.removeFromSuperview()
106
+ child.removeFromParent()
107
+ }
108
+ }
109
+
94
110
  @objc func dismissPopUpMessage() {
95
111
  DispatchQueue.main.async {
96
112
  if(!self.start){
@@ -176,6 +192,7 @@ class PassportController: UIViewController ,ScanPassportDelegate , ChildViewCont
176
192
  self.scanPassport?.view.removeFromSuperview()
177
193
  self.scanPassport?.removeFromParent()
178
194
  self.scanPassport = nil
195
+ self.closeAllCameras();
179
196
  self.dismiss(animated: false)
180
197
  }
181
198
  }
@@ -192,6 +209,7 @@ class PassportController: UIViewController ,ScanPassportDelegate , ChildViewCont
192
209
  self.scanPassport?.view.removeFromSuperview()
193
210
  self.scanPassport?.removeFromParent()
194
211
  self.scanPassport = nil
212
+ self.closeAllCameras();
195
213
  self.dismiss(animated: false)
196
214
  }
197
215
  }
package/ios/View/UI.swift CHANGED
@@ -6,7 +6,7 @@ protocol ChildViewControllerDelegate: AnyObject {
6
6
 
7
7
 
8
8
  func showNavigationBarWithBackArrow(view: UIView, target: Any?, action: Selector?, initialTextColorHex: String, initialBackgroundColorHex: String, title: String ){
9
- let navigationBar = UINavigationBar(frame: CGRect(x: 0, y: 35, width: view.frame.size.width, height: 50))
9
+ let navigationBar = UINavigationBar(frame: CGRect(x: 0, y: 55, width: view.frame.size.width, height: 50))
10
10
  navigationBar.setBackgroundImage(UIImage(), for: .default)
11
11
  navigationBar.shadowImage = UIImage()
12
12
  navigationBar.isTranslucent = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assentify-sdk-react-native",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
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",