Search Issue Tracker

By Design



Found in







Issue ID




[iOS] GetLastRespondedNotification is not null after opening the app from notification and opening/closing Notification Center



Steps to reproduce:
1. Open the attached project ("")
2. Build and launch the project on a simulator
3. Put the app in the background (slide from the bottom of the screen)
4. Drag and drop the "Assets/notification.apns" file on the simulator
5. Press on the notification
6. Observe that the last received notification was logged to UI
7. Open Notification Center and go back to the app (swipe downwards from the top center of the screen)

Expected results: No more notifications are logged to UI, since upon returning focus to the app GetLastRespondedNotification should return null
Actual results: Notifications are logged to UI again

Reproducible with: 2019.4.29f1, 2020.3.14f1, 2021.1.15f1, 2021.2.0b2, 2022.1.0a1

- This behaviour can only be reproduced after opening the app from a notification. If the app is backgrounded and foregrounded after all the repro steps were followed, after opening/closing the Notification Center GetLastRespondedNotification will return null
- Tested using the simulator iPhone 12, iPhone 8 Plus both running iOS 14.3

  1. Resolution Note:

    GetLastRespondedNotification() returns last notification used to open the app, as documented. It's only cleared when the app is backgrounded. When Notification Center is opened on top of the app, the app goes to inactive state, but isn't backgrounded and that's why GetLastRespondedNotification() is not cleared.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.