Is it possible to get TouchID information and compare to a fingerprint database?
From Apple doc
Touch ID doesn't store any images of your fingerprint. It stores only
a mathematical representation of your fingerprint. It isn't possible
for someone to reverse engineer your actual fingerprint image from
this mathematical representation. The chip in your device also
includes an advanced security architecture called the Secure Enclave
which was developed to protect passcode and fingerprint data.
Fingerprint data is encrypted and protected with a key available only
to the Secure Enclave. Fingerprint data is used only by the Secure
Enclave to verify that your fingerprint matches the enrolled
fingerprint data. The Secure Enclave is walled off from the rest of
the chip and the rest of iOS. Therefore, iOS and other apps never
access your fingerprint data, it's never stored on Apple servers, and
it's never backed up to iCloud or anywhere else. Only Touch ID uses
it, and it can't be used to match against other fingerprint databases.
Link
https://support.apple.com/en-us/HT204587
ios8 TouchID detection if fingerprint was added
In short; no.
In a bit more detail; the LocalAuthentication
framework is a tightly-guarded black box. The information you get back from it is very limited. Your interaction with it goes something like this:
- Ask it if it's able to authenticate for some type of policy (there is only 1 available at time of writing - Biometrics (Touch ID))
- If it can, ask it to actually do it
- The system takes over for the actual authentication
- It lets you know if the authentication was successful or not (if not, it tells you why)
You have no concept of the actual authentication process (which finger was used, for example). This, of course, is by design. Apple does not want, nor need, to give you access to such information.
IOS8 get fingerprint data
No you can not read or save fingerprint data. Even Apple does not collect this data. You can only use the Touch ID sensor to unlock your app with the fingerprints the user has already saved in the system preferences.
TouchID - Detect new fingerprints added - When does evaluatedPolicyDomainState change?
So after struggling for a couple of hours, I finally found the solution.
let context = LAContext()
context.canEvaluatePolicy(.DeviceOwnerAuthenticationWithBiometrics, error: nil)
if let domainState = context.evaluatedPolicyDomainState
where domainState == oldDomainState {
// Enrollment state the same
} else {
// Enrollment state changed
}
Every time you add or delete a fingerprint, the domain state changes. You need to call canEvaluatePolicy
for evaluatedPolicyDomainState
to be updated.
Is it possible to convert your iphone in a multi user finger print scanner
Yes and no.
It is possible using the LAContext API's to recognize any of the fingerprints stored on the device. It is not currently possible to distinguish one fingerprint from another. For example, if Alice and Bob both have their fingerprints on Alice's phone, then you can code your app so that either Alice or Bob can use your app, but you cannot code your app so Alice can use it but Bob can't.
You absolutely do not have access to fingerprint data. See https://stackoverflow.com/a/30159079/1050482
(It isn't clear from you question which situation you mean.)
Is it possible to create some sort of hash/key from the user's fingerprint?
In short, Apple doesn't provide access to fingerprint data.
And it can't be used to match against other fingerprint databases.
Read more in an Apple support article on TouchID.
Also see: Is it possible to get TouchID information and compare to a fingerprint database?
How to wait TouchID until it finishes?
You should not attempt block the main thread while you wait for TouchID.
What you should probably do instead is insert a new ViewController ahead of the one you are trying to block access to and present the TouchID prompt over that screen. When successfully authenticated, push the ViewController you are restricting access to on to the stack.
Touch-id finger code for users migrating from iOS8
The evaluatedPolicyDomainState is an opaque structure that represents a the current "state" of the biometric database. If a device is upgraded from ios8 to ios9 then this state data will become available to your app the first time TouchID is used, but your app will have no prior value to compare against.
If the biometric database changes in any way (figures enrolled or removed) then a new "state" will be returned, but the state doesn't indicate the nature of the change and the state doesn't vary based on which finger was presented.
An app may choose to invalidate any cached credentials and require the user re-authenticate when the domain state changes as it potentially indicates that an additional fingerprint has been added to the database
Related Topics
How to Prevent a Remote Notification from Being Displayed
How to Parse Array of JSON to Array in Swift
Pinch to Zoom Effect on Uiimageview Inside Scrollview
How to Start an Ibeacon Transmitter in the Background
Restore Button for iOS Non-Consumable In-App Purchase
Dismiss a Parent Modal in Swiftui from a Navigationview
Building Ffmpeg iOS Libraries for Armv7, Armv7S, Arm64, I386 and Universal
How to Make a Mkannotationview Touch Sensitive
Gssendevent - Inject Touch Event iOS
Conditionally Hide Code from the Compiler
Get Cellid, Mcc, Mnc, Lac, Signal Strength, Quality and Network in iOS 8.3
Initwithstyle:Reuseidentifier: Not Called
How to Find the Kind of Errors a Method May Throw and Catch Them in Swift
Add Uitapgesturerecognizer to Uitextview Without Blocking Textview Touches