-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Starting application from background with notification happens in foreground (iOS) #590
Comments
Thanks |
Just to prepare you, @yedidyak, you are relying on bad practice in your application. The application states you rely on are Apple implementation detail, and should not be relied upon in production code. For example, you are using an old, deprecated API. Using the new UserNotifications API brings a different Apple implementation and application states are different there. The more I think about the solution to fix this issue (and how much it complicates the system), the more resistant I am to fixing it. Will discuss more with @rotemmiz, but just be prepared for this possible outcome. |
Further discussed with @rotemmiz. We have decided to mark this as "wontfix" and close. We plan to remove support of this deprecated API in Detox soon anyway. All is not lost, because we have a guild task to upgrade react-native-notifications to use the new Apple API instead of the old one. So it will be solved one way or another. |
For the sake of history, this was indeed a bug, which was handled in #604, by changing the way notifications and urls are being sent while application is in background. |
When trying to test opening an application from the background with a push notification with this code:
The notification is sent to the application but only after the native
UIApplicationState
is already changed toUIApplicationStateActive
. This makes the application behave as if the notification was opened when the app was already in the foreground.The same behaviour happens when trying like this:
@LeoNatan
The text was updated successfully, but these errors were encountered: