Unverified Commit 098c3791 authored by Gant Laborde's avatar Gant Laborde Committed by GitHub

Merge pull request #270 from gtebbutt/master

Remove LocalAuthentication import on tvOS
parents 114d1bad 9f56157b
......@@ -8,7 +8,9 @@
#import "RNDeviceInfo.h"
#import "DeviceUID.h"
#if !(TARGET_OS_TV)
#import <LocalAuthentication/LocalAuthentication.h>
#endif
@interface RNDeviceInfo()
@property (nonatomic) bool isEmulator;
......@@ -220,8 +222,12 @@ RCT_EXPORT_MODULE()
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]]);
}
......
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