7

In the event that my app receives a push notification while the touch ID dialog is on screen, I'd like to be able to cancel/dismiss it and handle the push.

Is this possible, or do I need to either store the push data until the user causes the dialog to dismiss or schedule a replacement local push to handle it later?

Hayden Gomes
  • 243
  • 2
  • 9
  • 1
    The touchID dialog is not presented (directly) by your app - it is presented by iOS when you request it. You will receive a call to `didResignActive` `didBecomeActive` in your app delegate when the touchID dialog is presented/dismissed. Perhaps you can use this to determine your application state and process the notification appropriately – Paulw11 Apr 30 '15 at 02:17

1 Answers1

5

Currently, the documentation of LAContext's invalidate() method states that a call to this function causes any currently in-progress authentication to fail via the systemCancel error code.

So when you get a notification, you can invalidate your local authentication context. Note that once invalidated, a context may not be reused.

Matthew Seaman
  • 7,952
  • 2
  • 37
  • 47