File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
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,13 +264,11 @@ - (NSString *)messageForError:(NSError *)error
261
264
262
265
RCT_EXPORT_METHOD (isSensorAvailable:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
263
266
{
264
- #if TARGET_OS_TV || TARGET_OS_MAC
265
- resolve (@(NO ));
266
- #else
267
+ #if !TARGET_OS_TV
267
268
LAContext *context = [[LAContext alloc ] init ];
268
269
269
270
if ([context canEvaluatePolicy: LAPolicyDeviceOwnerAuthenticationWithBiometrics error: NULL ]) {
270
- if (@available (iOS 11 , *)) {
271
+ if (@available (iOS 11 , macOS 10.13.2 , *)) {
271
272
if (context.biometryType == LABiometryTypeFaceID) {
272
273
return resolve (@" Face ID" );
273
274
}
@@ -276,6 +277,8 @@ - (NSString *)messageForError:(NSError *)error
276
277
} else {
277
278
resolve (@(NO ));
278
279
}
280
+ #else
281
+ resolve (@(NO ));
279
282
#endif
280
283
}
281
284
@end
You can’t perform that action at this time.
0 commit comments