In our latest Ask a Dev video, iOS engineer Chris Gibbs discusses how to use Touch ID for authentication. With the big news of Apple Pay, Touch ID will be a big safety feature worth incorporating.

Using Touch ID is easy for developers, as iOS handles presenting the user with a prompt to authenticate with it. The only part of this prompt that you can customize is the reason string.

It's possible for authentication to fail if the user taps either of the two prompt options, or if the maximum number of Touch ID attempts is reached. This will trigger a descriptive error that should be handled by your app.

The best way to explore this is to download the sample code titled "KeychainTouchID: Using Touch ID with Keychain and LocalAuthentication” from the Apple developer library.

Subscribe to Ask a Dev to catch more episodes like this each week.