FinderSync sidebar icon not displaying

About a year ago, I developed a FinderSync extension for a MacOS desktop app, and included a custom icon to display in the sidebar and Favorites. And it worked.

Fast forward a year -- there have been changes to the containing app, and the custom icon has disappeared. I know the main app had moved to using an asset catalog for its app icons, which according to https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15 prevents the template-image sidebar icons from working.

So I followed the steps described on that page: I switched off the asset catalog, added a non-catalog iconset with the appropriate icon and sidebar files to both the containing app and the extension, and made sure that the Info.plist for both programs included a CFBundleIconFile entry set to the iconset name... but that didn't fix it.

(I do know that the asset catalog is still part of the main-app build, to supply other icons; all I did was switch off the setting to use it for the app icon.)

The .iconset folder contains the 10 normal icon .png files, and the six sidebar .png files; it compiles into an .icns file, which is successfully included in the build... but if I open that .icns file in Preview, it only shows the 10 normal icon sizes, not the sidebar files.

So what have I missed? How do I get iconutil to include the sidebar_ files at build time? And how exactly does the FinderSync extension locate the image to use for the sidebar icon? What other settings do I need to check?

I am actually struggling with the same issue on Big Sur and Monterey. I really wonder, if these definitions of the sidebar icons are correct. To me, they do not make sense

FinderSync sidebar icon not displaying
 
 
Q