Local notifications are no longer presented if a notification with the same ID was already presented
| Originator: | robotspacer | ||
| Number: | rdar://29747201 | Date Originated: | 19-Dec-2016 10:29 PM |
| Status: | Closed | Resolved: | |
| Product: | macOS + SDK | Product Version: | macOS 10.12.2 (16C67) |
| Classification: | Serious Bug | Reproducible: | Always |
Area: Something not on this list Summary: My app Deliveries makes use of local notifications. The app reuses the same identifier for each delivery, so old information is replaced with the most recent information. I've recently noticed some inconsistencies in whether these notifications are displayed. In the past, each call to deliverNotification: would present the notification in the top-right corner of the screen. Now that doesn't seem to be the case. If a notification with the same identifier is already in Notification Center, the new notification is not presented—it just quietly replaces the information in Notification Center. I don't know if this is an intentional change in behavior, and I'm not sure when it happened. I only noticed it recently, after months of testing a new version of my app, so I assume something changed in 10.12.2. Steps to Reproduce: 1. Download the attached sample app. 2. Run the app. 3. Quickly switch to another app, and wait a second or two for the notification to display. 4. Quit the app. 5. Run the app again. 6. Quickly switch to another app, and wait a second or two. Expected Results: A second notification should display, with the text "Message 2" (or some other higher number). Actual Results: The second notification is not displayed. If you open Notification Center, you'll see the new notification there. Version: macOS 10.12.2 (16C67) Notes: Configuration: 3.3 GHz Intel Core i7, 16 GB RAM, 1TB SSD, Intel Iris Graphics 550 1536 MB Attachments: 'Archive.zip' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Turns out this is expected behavior, and it has always been this way. You can work around it by removing the existing notification first with removeDeliveredNotification: