FIFinder Sync - no external or Apple script way to update a specific file or folder's overlay

Originator:eoin.norris
Number:rdar://18555373 Date Originated:10/09/2014
Status:Open Resolved:
Product:Mac OS X Product Version:10.10
Classification:High Reproducible:Always
 
Summary:
The new FIFInder extension allows developers to not use the hack injection code to draw overlays. It works, however it is not possible for the containing application to message the Finder to redraw the overlay for a file. For a syncing application a file won't just update when the user refreshes a folder by clicking to it, or when the file is added,  but at any time during the sync. From unsynced to pending to synced, or error.

Steps to Reproduce:
1) Open the attached project.
2) Create a folder and sub folders in /Users/Shared/MySyncExtension Documents
3) Build and run. 
4) The containing app will list the folders and assign a random badge number. The UI shows the path and associated overlay icns files.
5) These values are stored in the shared group defaults.
6) The Finder extension picks up the shared overlay defaults on every call to beginObservingDirectoryAtURL: ( This is slightly inefficient but works for now).
7) However the user won't see the icons update unless he refreshes the folder himself, in general by changing the view type or clicking somewhere else and back again.

I haven't found a way to force the updates. Attached is a Finder script I am using. 


Expected Results:
Some mechanism to force the finder to update the overlay for a specified file. Either externally or in the extension itself.

Actual Results:
No such mechanism.

Version:
Yosemite GM candidate 1.

Notes:


Configuration:
Any Mac capable of running GM 1

Attachments:
'Personal Cloud.zip' and 'update finder.scpt' were 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!