File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55#import " React/RCTConvert.h"
66#import " React/RCTBridge.h"
77#import " React/RCTUtils.h"
8+
9+ #if !TARGET_OS_TV
810#import < LocalAuthentication/LocalAuthentication.h>
11+ #endif
912
1013@implementation RNSensitiveInfo
1114
@@ -261,10 +264,11 @@ - (NSString *)messageForError:(NSError *)error
261264
262265RCT_EXPORT_METHOD (isSensorAvailable:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
263266{
267+ #if !TARGET_OS_TV
264268 LAContext *context = [[LAContext alloc ] init ];
265269
266270 if ([context canEvaluatePolicy: LAPolicyDeviceOwnerAuthenticationWithBiometrics error: NULL ]) {
267- if (@available (iOS 11 , *)) {
271+ if (@available (iOS 11 , macOS 10.13.2 , *)) {
268272 if (context.biometryType == LABiometryTypeFaceID) {
269273 return resolve (@" Face ID" );
270274 }
@@ -273,5 +277,8 @@ - (NSString *)messageForError:(NSError *)error
273277 } else {
274278 resolve (@(NO ));
275279 }
280+ #else
281+ resolve (@(NO ));
282+ #endif
276283}
277284@end
You can’t perform that action at this time.
0 commit comments