Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
react-native-device-info
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
放牛的园子
react-native-device-info
Commits
098c3791
Unverified
Commit
098c3791
authored
Nov 22, 2017
by
Gant Laborde
Committed by
GitHub
Nov 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #270 from gtebbutt/master
Remove LocalAuthentication import on tvOS
parents
114d1bad
9f56157b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
RNDeviceInfo.m
RNDeviceInfo/RNDeviceInfo.m
+6
-0
No files found.
RNDeviceInfo/RNDeviceInfo.m
View file @
098c3791
...
@@ -8,7 +8,9 @@
...
@@ -8,7 +8,9 @@
#import "RNDeviceInfo.h"
#import "RNDeviceInfo.h"
#import "DeviceUID.h"
#import "DeviceUID.h"
#if !(TARGET_OS_TV)
#import <LocalAuthentication/LocalAuthentication.h>
#import <LocalAuthentication/LocalAuthentication.h>
#endif
@interface
RNDeviceInfo
()
@interface
RNDeviceInfo
()
@property
(
nonatomic
)
bool
isEmulator
;
@property
(
nonatomic
)
bool
isEmulator
;
...
@@ -220,8 +222,12 @@ RCT_EXPORT_MODULE()
...
@@ -220,8 +222,12 @@ RCT_EXPORT_MODULE()
RCT_EXPORT_METHOD
(
isPinOrFingerprintSet
:
(
RCTResponseSenderBlock
)
callback
)
RCT_EXPORT_METHOD
(
isPinOrFingerprintSet
:
(
RCTResponseSenderBlock
)
callback
)
{
{
#if TARGET_OS_TV
BOOL
isPinOrFingerprintSet
=
false
;
#else
LAContext
*
context
=
[[
LAContext
alloc
]
init
];
LAContext
*
context
=
[[
LAContext
alloc
]
init
];
BOOL
isPinOrFingerprintSet
=
([
context
canEvaluatePolicy
:
LAPolicyDeviceOwnerAuthentication
error
:
nil
]);
BOOL
isPinOrFingerprintSet
=
([
context
canEvaluatePolicy
:
LAPolicyDeviceOwnerAuthentication
error
:
nil
]);
#endif
callback
(@[[
NSNumber
numberWithBool
:
isPinOrFingerprintSet
]]);
callback
(@[[
NSNumber
numberWithBool
:
isPinOrFingerprintSet
]]);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment