{"id":20305,"date":"2016-03-21T13:03:38","date_gmt":"2016-03-21T18:33:38","guid":{"rendered":"https:\/\/www.solutionanalysts.com\/blog\/whats-new-in-touchid-ios-9\/"},"modified":"2023-08-16T23:11:07","modified_gmt":"2023-08-17T04:41:07","slug":"whats-new-in-touchid-ios-9","status":"publish","type":"post","link":"https:\/\/www.solutionanalysts.com\/blog\/whats-new-in-touchid-ios-9\/","title":{"rendered":"What\u2019s new in TouchID iOS 9"},"content":{"rendered":"<p>TouchID is the biometric authentication technology that Apple introduced in iOS 7 to unlock user devices and make purchases in the App Store. It is built on framework named LocalAuthentication.<\/p>\n<p>In iOS 9, There are several new features introduced in LocalAuthentication framework which is listed below:-<\/p>\n<ul>\n<li>Support for reusable TouchID matches<\/li>\n<li>Support for cancelling a user prompt from code<\/li>\n<li>Get representation of current set of enrolled fingers. All apps will change behaviour when a finger is enrolled or removed<\/li>\n<li>Evaluation of keychain access control lists and use of authentication context in keychain calls<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Support_for_reusable_TouchID_matches\"><\/span><strong>Support for reusable TouchID matches<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Apple has introduced a new feature in iOS 9 through which we can reuse iPhone unlock authentication for applications. Just add LAContect property called \u201ctouchIDAuthenticationAllowableReuseDuration\u201d.<\/p>\n<p>Previous TouchID authentication cannot be reused and maximum supported intervals is 5 minutes. By setting value beyond 5 minutes, the accepted interval cannot be increased. \u201ctouchIDAuthenticationAllowableReuseDuration\u201d property sets a time interval for accepting a successful TouchID unlock from the past.<\/p>\n<p>Here, time interval is in seconds. If the device is successfully unlocked by TouchID with in time interval, then TouchID authentication on this context will succeed automatically and the reply block will be called user for TouchID.<\/p>\n<p><strong>Note: &#8211;<\/strong> These features are supported only when phone is unlocked using TouchID.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Support_for_cancelling_a_user_prompt_from_Code\"><\/span><strong>Support for cancelling a user prompt from Code<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>To implement a functionality that automatically cancels authentication context after some time, in iOS 8, it is not possible until you press on authentication alert cancel button.<\/li>\n<li>With iOS 9 this has been resolved. Now, we can manually cancel authentication context by calling property \u201cinvalidate()\u201d. Invalidation terminates any existing policy evaluation and the respective call will fail with LAErrorAppCancel.<\/li>\n<li>After the context has been invalidated, it cannot be used for policy evaluation and an attempt to do so will fail with LAErrorInvalidContext.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"The_ability_to_get_a_representation_of_the_current_set_of_enrolled_fingers\"><\/span><strong>The ability to get a representation of the current set of enrolled fingers<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A representation of current set of enrolled fingers can be obtained and when any operation occurs relating to enrolment and deletion, different data can be obtained from previous data from fingerprint database.<\/p>\n<p>Current fingerprint data can be accessed in TouchID Authentication by \u201cevaluatedPolicyDomainState\u201d property. In output, we get NSData as current enrolled finger data value.<\/p>\n<p>By checking\/comparing current finger data with previous data, you can do some action if any operation performs with finger database.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"LAPolicy\"><\/span>LAPolicy<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>There are two types of LAPolicy available in LocalAuthentication Framework:-<\/p>\n<ul>\n<li>DeviceOwnerAuthenticationWithBiometrics<\/li>\n<li>DeviceOwnerAuthentication<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"DeviceOwnerAuthenticationWithBiometrics\"><\/span><strong>DeviceOwnerAuthenticationWithBiometrics<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>This Policy is introduced in iOS 8 and it gives user-authentication by using \u201cBiometrics\u201d. If biometrics fails, then custom authentication mechanism for authentication use as a fallback mechanism can be used for the application.<\/p>\n<p>If TouchID is not available or not enrolled, then policy evaluation will fail and if TouchID is locked out, Passcode is required to unlock the TouchID. Biometrics authentication will get locked after 5 unsuccessful attempts.<\/p>\n<p>If you use DeviceOwnerAuthenticationWithBiometrics as LAPolicy and do not set fall-back mechanism, then in the app review process Apple will reject application for same reason.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"DeviceOwnerAuthentication\"><\/span><strong>DeviceOwnerAuthentication<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>These policies are newly introduced in iOS 9 and it authenticates use by using \u201cBiometrics\u201d and \u201cDevice Passcode\u201d. Custom fall-back mechanism for authentication is not required in this policy \u201cDevice Passcode\u201d is used as custom fall-back mechanism.<\/p>\n<p>If TouchID is available, enrolled and not locked out, user is first asked for it, otherwise user has to authenticate it using device passcode.<\/p>\n<p>Biometrics authentication will get locked after 5 unsuccessful attempts and Passcode authentication will get locked after 6 unsuccessful attempts and with progressively increased back off delay.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"LAError\"><\/span>LAError<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>LocalAuthentication framework also supports variety of error types, where each one represents a fail reason and gives the developers options to take proper action in each case. The error types are implemented as an enum:<\/p>\n<p>enum LAError : Int {<br \/>\n\/* Availability in iOS 8 *\/<br \/>\ncase AuthenticationFailed<br \/>\ncase UserCancel<br \/>\ncase UserFallback<br \/>\ncase SystemCancel<br \/>\ncase PasscodeNotSet<br \/>\ncase TouchIDNotAvailable<br \/>\ncase TouchIDNotEnrolled<br \/>\n\/* Availability in iOS 9 *\/<br \/>\ncase TouchIDLockout<br \/>\ncase AppCancel<br \/>\ncase InvalidContext<br \/>\n}<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Here_only_those_LAError_details_are_available_which_are_introduced_in_iOS_9\"><\/span><strong>Here only those LAError details are available which are introduced in iOS 9:-<br \/>\n<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>TouchIDLocout: &#8211; Authentication was unsuccessful because there were too many failed TouchID attempts and now TouchID is locked and it must require passcode to unlock TouchID.<\/li>\n<li>AppCancel:- Authentication was cancelled by application, which means it will manually dismiss authentication by calling invalidate() method<\/li>\n<li>InvalidContext: &#8211; LAContext passed to this call has been previously invalidated.<\/li>\n<\/ul>\n<p>With these new features, <a href=\"https:\/\/www.solutionanalysts.com\/ios-application-development\/\">iOS app developers<\/a> can integrate TouchID feature in applications and seamlessly integrate it with the user device. It also gives the user more control and security with simple measures.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TouchID is the biometric authentication technology that Apple introduced in iOS 7<\/p>\n","protected":false},"author":1,"featured_media":20306,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[198],"tags":[],"class_list":["post-20305","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ios-apps"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts\/20305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/comments?post=20305"}],"version-history":[{"count":2,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts\/20305\/revisions"}],"predecessor-version":[{"id":32696,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts\/20305\/revisions\/32696"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/media\/20306"}],"wp:attachment":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/media?parent=20305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/categories?post=20305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/tags?post=20305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}