Replies: 1 comment
-
You are right @dmateertf . I have same question, when open my app from notification on iOS getInitialNotification() returns null but onForegroundEvent fired, with onFroegroundEvent I can not control my flow to navigate user to the related screen. I think usage of getInitialNotificaion of notifee is inevitably. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The notifee documentation states, "It is recommended to always check if a notification has caused your app to open before displaying the main app content. Once consumed, the initial notification is removed." The example provided uses the
getInitialNotification
method. However, there is a note immediately above that documentation which states, "getInitialNotification
is deprecated on iOS in favour of thePRESS
event received by theonForegroundEvent
event handler."So how does one bootstrap the application in iOS? I am in need of exactly this use case, to detect when the application was not in the foreground initially but opened up via a notification so that I can "short-circuit" the application loading. When I try this, I am seeing that
getInitialNotification
does not return anything butonForegroundEvent
is called, but of course relying on registeringonForegroundEvent
means that the cattle are already out of the barn by the time the handler runs.How do I handle this on iOS?
Beta Was this translation helpful? Give feedback.
All reactions