eHarmony Engineering logo

Touch ID Security & iOS 8

Christopher Truman

October 7, 2014

The next Blog post in our series on ‘Modernizing a Mobile App’ looks at implementing Apple’s Touch ID security. The fingerprint scanner on the iPhone 5s enables Touch ID to identify users, and allows us to quickly authenticate them before they get to check out their new eHarmony matches. Christopher Truman

As eHarmony’s Senior iOS Development Manager Gary Philipp previously wrote, we are modernizing our iOS app. We are working to bring our app up to date by removing technical debt, cleaning up unused code, and implementing better development practices. While we still have a lot of work to do, we also want to stay up to date with all the new features available on the iOS platform.

The first new iOS 8 feature we’ve implemented is Touch ID security. We can now sign in to our banks, social networks, and other apps with our fingers. This is the stuff of science fiction!

Oooooh… fancy!

Touch ID was built into the iPhone 5S that was released in September 2013. At the Apple WWDC (World Wide Developer Conference) they announced that developers could now use Touch ID in their apps.

As you may remember, some developers looked into the private frameworks in iOS 7 and found a framework called BiometricsKit. This got us developers giddy with anticipation, hoping and praying for third-party access.

Introducing LocalAuthentication.framework

This is the framework that allows you to authenticate with TouchID (and potentially other types of local authentication). The basic process for requesting authentication is as follows:

  • Create a Local Authentication Context (LAContext)
  • Create a Local Authentication Policy (LAPolicy) and specify what type of authentication you want (LAPolicyDeviceOwnerAuthenticationWithBiometrics)
  • Use the context to evaluate the policy and receive either a success or failure

Enough of boring lists, take a look at the code sample.

Simple, sweet, and secret agent-y. Now you can use your thumb to access all your personal data.

Here at eHarmony, we are implementing a privacy feature allowing you to hide your hot dates behind a Touch ID security wall. You can see the rough mock ups below:

Touch ID keeps you safe from people peeking at your matches!

We are committed to build the latest and greatest features into the eHarmony app, while keeping it stable and reliable. Apple rewarded our efforts by featuring us in the Touch ID section: