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
720fe01d
Commit
720fe01d
authored
Mar 10, 2017
by
Kacyn Fujii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make security info a callback
parent
cf5075db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
RNDeviceInfo.m
RNDeviceInfo/RNDeviceInfo.m
+9
-7
No files found.
RNDeviceInfo/RNDeviceInfo.m
View file @
720fe01d
...
...
@@ -163,12 +163,6 @@ RCT_EXPORT_MODULE()
return
[[
UIDevice
currentDevice
]
userInterfaceIdiom
]
==
UIUserInterfaceIdiomPad
;
}
-
(
bool
)
isPinOrFingerprintSet
{
LAContext
*
context
=
[[
LAContext
alloc
]
init
];
return
([
context
canEvaluatePolicy
:
LAPolicyDeviceOwnerAuthentication
error
:
nil
]);
}
-
(
NSDictionary
*
)
constantsToExport
{
UIDevice
*
currentDevice
=
[
UIDevice
currentDevice
];
...
...
@@ -193,8 +187,16 @@ RCT_EXPORT_MODULE()
@"timezone"
:
self
.
timezone
,
@"isEmulator"
:
@
(
self
.
isEmulator
),
@"isTablet"
:
@
(
self
.
isTablet
),
@"isPinOrFingerprintSet"
:
@
(
self
.
isPinOrFingerprintSet
),
};
}
RCT_EXPORT_METHOD
(
isPinOrFingerprintSet
:
(
RCTResponseSenderBlock
)
callback
)
{
LAContext
*
context
=
[[
LAContext
alloc
]
init
];
BOOL
b
=
([
context
canEvaluatePolicy
:
LAPolicyDeviceOwnerAuthentication
error
:
nil
]);
NSMutableArray
*
array
=
[[
NSMutableArray
alloc
]
init
];
[
array
addObject
:[
NSNumber
numberWithBool
:
b
]];
callback
(@[
array
]);
}
@end
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