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,13 +264,11 @@ - (NSString *)messageForError:(NSError *)error
261264
262265RCT_EXPORT_METHOD (isSensorAvailable:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
263266{
264- #if TARGET_OS_TV || TARGET_OS_MAC
265- resolve (@(NO ));
266- #else
267+ #if !TARGET_OS_TV
267268 LAContext *context = [[LAContext alloc ] init ];
268269
269270 if ([context canEvaluatePolicy: LAPolicyDeviceOwnerAuthenticationWithBiometrics error: NULL ]) {
270- if (@available (iOS 11 , *)) {
271+ if (@available (iOS 11 , macOS 10.13.2 , *)) {
271272 if (context.biometryType == LABiometryTypeFaceID) {
272273 return resolve (@" Face ID" );
273274 }
@@ -276,6 +277,8 @@ - (NSString *)messageForError:(NSError *)error
276277 } else {
277278 resolve (@(NO ));
278279 }
280+ #else
281+ resolve (@(NO ));
279282#endif
280283}
281284@end
You can’t perform that action at this time.
0 commit comments