File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 5
5
#import " React/RCTConvert.h"
6
6
#import " React/RCTBridge.h"
7
7
#import " React/RCTUtils.h"
8
+
9
+ #if !TARGET_OS_TV
8
10
#import < LocalAuthentication/LocalAuthentication.h>
11
+ #endif
9
12
10
13
@implementation RNSensitiveInfo
11
14
@@ -261,10 +264,11 @@ - (NSString *)messageForError:(NSError *)error
261
264
262
265
RCT_EXPORT_METHOD (isSensorAvailable:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
263
266
{
267
+ #if !TARGET_OS_TV
264
268
LAContext *context = [[LAContext alloc ] init ];
265
269
266
270
if ([context canEvaluatePolicy: LAPolicyDeviceOwnerAuthenticationWithBiometrics error: NULL ]) {
267
- if (@available (iOS 11 , *)) {
271
+ if (@available (iOS 11 , macOS 10.13.2 , *)) {
268
272
if (context.biometryType == LABiometryTypeFaceID) {
269
273
return resolve (@" Face ID" );
270
274
}
@@ -273,5 +277,8 @@ - (NSString *)messageForError:(NSError *)error
273
277
} else {
274
278
resolve (@(NO ));
275
279
}
280
+ #else
281
+ resolve (@(NO ));
282
+ #endif
276
283
}
277
284
@end
You can’t perform that action at this time.
0 commit comments