-
Notifications
You must be signed in to change notification settings - Fork 25
Description
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).