NSDockTilePlugIn and APNs

Originator:mrpicnic
Number:rdar://31006055 Date Originated:13-Mar-2017
Status:Closed Resolved:No
Product:Mac OS X Product Version:10.11.6 (15G1004)
Classification:Other Bug Reproducible:Always
 
Area:
AppKit

Summary:
The problem appears when the dock plug-in and APNs are combined

If an application is closed and the plug-in has set a badge count on the dock icon, when a notification comes with an updated badge, I cannot see any change on the dock icon.

Steps to Reproduce:
1. Prepare an application with the dock tile plug-in installed (https://developer.apple.com/library/content/samplecode/DockTile)
2. Add APNs handling
3. Set a badge count and close the application - the badge should stay on the dock icon because of the plug-in
4. Send a notification to the application with an updated badge value


Expected Results:
The notification comes and the dock badge is updated.

Actual Results:
The notification comes but the dock badge still has the old value.

Version:
10.9-10.12

Notes:
The plug-in has other bundle identifier than the application. Target of notifications is the application's bundle identifier. 

The problem can be also synchronisation between the plug-in and the notification (even if the notification would be setting the badge count). The application saves a badge value into the User Defaults. The plugin loads the badge value from there. If the application is closed and the notification comes with an update, the plug-in - when starts running - will not know about updated value and will load the old value.

Configuration:
MacBook Pro Mid 2015
OS X 10.11.6
Xcode 8.2.1

Comments

Engineering has determined that there are currently no plans to address this issue:

You have to use one or the other, you can’t mix these.


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!