@getyoti/react-native-yoti-face-capture 2.0.0 → 2.0.1

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/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
1
  # ChangeLog
2
+ ## Version 2.0.1
3
+
4
+ Contains a couple of bug fixes on the iOS side of the SDK:
5
+ - Solves the discrepancy between the required screen units that needs to be used for Android and iOS. Now, both platforms will be expecting pixels when defining the scanning area.
6
+ - Fixes a crash when the component was used inside of a react-navigation react-stack screen.
7
+
2
8
  ## Version 2.0.0
3
9
 
4
10
  BREAKING CHANGE: Low light detection
@@ -8,8 +14,8 @@ Please, check [README.md](https://github.com/getyoti/react-native-yoti-face-capt
8
14
 
9
15
  ## Version 1.1.0
10
16
 
11
- Fix: README.md
17
+ Fix: README.md
12
18
 
13
19
  ## Version 1.0.0
14
20
 
15
- Face capture first release
21
+ Face capture first release
@@ -6,7 +6,7 @@
6
6
  - (instancetype)initWithFrame:(CGRect)frame
7
7
  {
8
8
  self = [super initWithFrame:frame];
9
- self.rootViewController = RCTPresentedViewController();
9
+ self.rootViewController = [[[UIApplication sharedApplication] keyWindow] rootViewController];
10
10
  self.faceCaptureViewController = [FaceCapture faceCaptureViewController];
11
11
  self.faceCaptureViewController.delegate = self;
12
12
  self.faceCaptureViewController.view.backgroundColor = [UIColor clearColor];
@@ -65,8 +65,8 @@
65
65
  CGRect area = CGRectMake(
66
66
  [(NSNumber *)[scanningArea objectAtIndex:0] floatValue],
67
67
  [(NSNumber *)[scanningArea objectAtIndex:1] floatValue],
68
- [(NSNumber *)[scanningArea objectAtIndex:2] floatValue],
69
- [(NSNumber *)[scanningArea objectAtIndex:3] floatValue]
68
+ [(NSNumber *)[scanningArea objectAtIndex:2] floatValue] / [UIScreen mainScreen].scale,
69
+ [(NSNumber *)[scanningArea objectAtIndex:3] floatValue] / [UIScreen mainScreen].scale
70
70
  );
71
71
  [self.faceCaptureConfiguration setScanningArea:area];
72
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getyoti/react-native-yoti-face-capture",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "An easy to use face detection component for React Native from Yoti.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",