Example for Apple’s Touch ID Fingerprint API for Swift and iOS

09/04/2014 / 0 Comments

Swift is the new programming language which was published by Apple in XCode 6. It can be used for Cocoa and Cocoa Touch, on iOS as well as on OS X.
Swift code can be applied side-by-side with Objective-C. It is designed to assist developers in writing secure and reliable codes. This includes mechanisms which provoke that all variables are initialized before the first access, that domains are checked for overflows as well as automatic storage management. Furthermore, Swift is optimized for runtime performance and is closely connected with Xcode and Xcode Playgrounds. Thus, all developer tools and debuggers can be provided. For more information about Swift please visit Apple´s developer sites.

The Touch ID Fingerprint API for Swift will be available under iOS 8. It enables user authentication by the use of the fingerprint sensor. This enables the realization of logins, the encryption of user data and storage in the keychain.

We recently integrated the new Touch ID fingerprint verification as biometric login procedure into our SecSign ID app.  SecSign ID offers users a secure login procedure for websites and programs and eliminates the need for passwords. The principle on which the SecSign ID is based is a physical two-factor authentication (2FA).

Requirements for the use of Swift and the Touch ID Fingerprint API for Swift:

  • XCode 6
  • iPhone 5s with iOS 8

two_factor_authentication_touchID

The iOS Touch ID authentication takes place in three steps:

  • The check whether the Touch ID Fingerprint API is available
  • The validation of the fingerprint
  • The validation of the fingerprint or the device´s PIN

 

Swift sample code how to use Touch ID:


Further information

You can find a detailed description in the blog „How to Use Apple‘s Touch ID Fingerprint API in Your Mobile App“. You will also find there a description of the integration of the Touch ID Fingerprint API and the keychain under iOS

And we would love to hear your feedback. To see the code in action, please watch our YouTube demo video showcasing the world’s first Apple Touch ID web login. And you can visit our website to learn more about our current SecSign ID solution and download the current version of our app in the iTunes App Store.

[/section]
Do NOT follow this link or you will be banned from the site!