I got the exact same issue but I think the problem is that the "didEnumerate" calls do not trigger Finder / fileproviderd to process each chunk of files so they are only taken in account at the very end of the enumeration cycles when finishEnumerating gets called. Some of my enumeration have several thousands items so it can take several minutes to enumerate and then an other several minutes after finishEnumerating is called to display in Finder ( as you found out ).
Question is how to trigger fileproviderd to take each chunk of items in account when calling observer.didEnumerate ?
Post
Replies
Boosts
Views
Activity
Managed to get it working with random icons with this in the Info.plist in the main app bundle
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>com.apple.icon-decoration.badge</string>
</array>
<key>UTTypeDescription</key>
<string>Stared Item</string>
<key>UTTypeIconFile</key>
<string>mvstar.icns</string>
<key>UTTypeIdentifier</key>
<string>com.sk.mvapp.xxxxxFP.Provider.star</string>
</dict>
Then add the icns file in the xcasset or the main app folder
Also double check that your file really has the decoration tag with fileproviderctl evaluate