Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2019.4.26f1
2020.3
2021.1
2021.2
2022.1
Issue ID
1348830
Regression
No
[iOS] GetLastRespondedNotification is not null after opening the app from notification and opening/closing Notification Center
Steps to reproduce:
1. Open the attached project ("NotificationAgain.zip")
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
Notes:
- 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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Constant console errors when using Min/Max Slider in PlayMode
- The global scene list is overridden in a project built with command line when the Override Global Scene List setting is disabled in the build profile
- [Linux] AutoLocale log is logged when opening a project
- Global Scenes are not included in the Build when building multiple Build Profiles at the same time
- [iOS] WebCamDevice.availableResolutions returns a single resolution with width and height both 0 on some iOS devices
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.