How does an app bind a custom display name to a sidebar Favorites entry pointing at a NSFileProviderDomain mount, while preserving the FP extension's icon?
Inserting the volume URL directly via LSSharedFileListInsertItemURL keeps the icon but uses the volume's default name. Inserting an alias-bookmark file or symlink to the volume with a custom filename gives the custom name but drops the icon to the generic alias glyph.
Since other apps seem to have achieved this, I wonder what's missing in order to get it working. I've dropped a lot of work into this already and tried so many things but none has been working.
What's complicating things is that working with plugins are easy to get wrong – the old plugin might not be correctly unloaded so you get stale behaviour etc. I've already spent more time with this than I'd care to admit.
Since LSSharedFileListInsertItemURL is deprecated it's natural that setting the name/icon is getting ignored, but there's clearly a way to make it work.
For apps that have this working I did the following test:
Change the name - icon stays the same
Restart Finder - icon now becomes a generic icon
Change the name back to the original
Restart Finder - icon reverts to the "proper" icon.
Apart from this I've been able to verify that aliases produced by my app has the same data as apps with this working.
Any hints would be greatly appreciated.
2
0
97