Commit 9f56157b authored by gtebbutt's avatar gtebbutt

Remove LocalAuthentication import on tvOS

Fixes tvOS build issues
parent 114d1bad
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
#import "RNDeviceInfo.h" #import "RNDeviceInfo.h"
#import "DeviceUID.h" #import "DeviceUID.h"
#if !(TARGET_OS_TV)
#import <LocalAuthentication/LocalAuthentication.h> #import <LocalAuthentication/LocalAuthentication.h>
#endif
@interface RNDeviceInfo() @interface RNDeviceInfo()
@property (nonatomic) bool isEmulator; @property (nonatomic) bool isEmulator;
...@@ -220,8 +222,12 @@ RCT_EXPORT_MODULE() ...@@ -220,8 +222,12 @@ RCT_EXPORT_MODULE()
RCT_EXPORT_METHOD(isPinOrFingerprintSet:(RCTResponseSenderBlock)callback) RCT_EXPORT_METHOD(isPinOrFingerprintSet:(RCTResponseSenderBlock)callback)
{ {
#if TARGET_OS_TV
BOOL isPinOrFingerprintSet = false;
#else
LAContext *context = [[LAContext alloc] init]; LAContext *context = [[LAContext alloc] init];
BOOL isPinOrFingerprintSet = ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:nil]); BOOL isPinOrFingerprintSet = ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:nil]);
#endif
callback(@[[NSNumber numberWithBool:isPinOrFingerprintSet]]); callback(@[[NSNumber numberWithBool:isPinOrFingerprintSet]]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment