From 9f56157b67dab378384a7b794dbce3efc766e2b7 Mon Sep 17 00:00:00 2001 From: gtebbutt Date: Wed, 22 Nov 2017 16:57:34 +0000 Subject: [PATCH] Remove LocalAuthentication import on tvOS Fixes tvOS build issues --- RNDeviceInfo/RNDeviceInfo.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RNDeviceInfo/RNDeviceInfo.m b/RNDeviceInfo/RNDeviceInfo.m index 9ecd95d93..eed1b5f99 100644 --- a/RNDeviceInfo/RNDeviceInfo.m +++ b/RNDeviceInfo/RNDeviceInfo.m @@ -8,7 +8,9 @@ #import "RNDeviceInfo.h" #import "DeviceUID.h" +#if !(TARGET_OS_TV) #import +#endif @interface RNDeviceInfo() @property (nonatomic) bool isEmulator; @@ -220,8 +222,12 @@ - (NSDictionary *)constantsToExport RCT_EXPORT_METHOD(isPinOrFingerprintSet:(RCTResponseSenderBlock)callback) { + #if TARGET_OS_TV + BOOL isPinOrFingerprintSet = false; + #else LAContext *context = [[LAContext alloc] init]; BOOL isPinOrFingerprintSet = ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:nil]); + #endif callback(@[[NSNumber numberWithBool:isPinOrFingerprintSet]]); }