Skip to content

FaceID is not triggered when the iOS app is opened from a push notification #709

@pedroferreira1

Description

@pedroferreira1

Context

When a push notification is received in the app, the App.js already renders the screen and the PinScreen is mounted. When we call the componentDidMount, we also call askBiometricId, which would show the FaceID for the user. However, this happens as soon as the push notification arrives, not when the user opens the app, so the user phone might still be locked. Since we use the accessible options for the Keychain.setGenericPassword as ACCESSIBLE.WHEN_UNLOCKED_THIS_DEVICE_ONLY, the getGenericPassword will fail because the device is locked.

This happens only in iOS devices.

I tried handling this with app state but when the componentDidMount is first called, the state is null and there's no change until the notification is clicked. We could handle the did mount only after the state change (after the notification click) and this works for the notification case but this breaks in other situations (when you open the app clicking on the icon).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions