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
- ArgumentOutOfRangeException when manipulating the Project Settings search bar
- [Linux] Touch freezes in Player when any mouse button is clicked
- UnityEngine.Rendering.Volume.OnEnable() is called twice before OnDisable() creating multiple copies of the same volume when a volume is enabled right after Domain Reload when entering Play Mode
- Hinge Joint transforms are reset when toggling the "useMotor" property
- Motion Vector texture reports incorrect Mesh data when Mesh is coming from off-screen
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.