Opening an iOS message after getting a onShowInboxMessage (when opening a push notification) event from Airship.onShowInboxMessage and navigating to the message (using a MaterialPage to open a component that has InboxMessageView) does not load the message view.
IMPORTANT: this only happens on iOS AND when the application is NOT running in the background.
P.S. if the app is already opened or in the background, the InboxMessageView works fine.
This issue happens when the user opens the app from a push notification and Airship.onShowInboxMessage is triggered.
The example shows a blank page after navigation:
After the initial opening, If I open the message again it works.
For now, I've solved the issue by using a FutureBuilder:
This solves the issue since I think it might be a race condition of Flutter trying to show the message via InboxMessageView and Airship initializing on iOS.
What is the expected behavior?
The InboxMessageView should show the message center message if it is opened from a push notification and navigated to a component via InboxMessageView.
This works for Android, but not for IOS.
What are the steps to reproduce the unexpected behavior?
In order to replicate this:
Use an iOS device;
Have an InboxMessageView set up to show a message after Airship.onShowInboxMessage stream is updated with a messageId;
Do not have the application in the background (in order to test you can use a --release mode)
Send a push notification + message center message to the app;
Open the push notification (it should open an InboxMessageView with a messageId)
Preliminary Info
Opening an iOS message after getting a
onShowInboxMessage
(when opening a push notification) event fromAirship.onShowInboxMessage
and navigating to the message (using aMaterialPage
to open a component that hasInboxMessageView
) does not load the message view.What Airship dependencies are you using?
Airship 6.1.0 https://pub.dev/packages/airship_flutter (latest current version)
Report
What unexpected behavior are you seeing?
IMPORTANT: this only happens on iOS AND when the application is NOT running in the background. P.S. if the app is already opened or in the background, the
InboxMessageView
works fine.This issue happens when the user opens the app from a push notification and
Airship.onShowInboxMessage
is triggered.The example shows a blank page after navigation:
After the initial opening, If I open the message again it works.
For now, I've solved the issue by using a FutureBuilder:
This solves the issue since I think it might be a race condition of Flutter trying to show the message via InboxMessageView and Airship initializing on iOS.
What is the expected behavior?
The
InboxMessageView
should show the message center message if it is opened from a push notification and navigated to a component viaInboxMessageView
.This works for Android, but not for IOS.
What are the steps to reproduce the unexpected behavior?
In order to replicate this:
InboxMessageView
set up to show a message afterAirship.onShowInboxMessage
stream is updated with amessageId
;--release
mode)