FinderSync extension not playing nice with other Finder extensions and folders

We have created a Menu App that has a FinderSync extension to provide contextual menus in certain folders. This works as expected, and adds the additional menus for just the selected folders. This is accomplished by watching the desired folders:

finderController.directoryURLs = urlFolders

and creating a MenuKind menu item for type:

.contextualMenuForItems:

However, it seems to not play nice and occasionally replaces the folder icons with the apps icon and removes contextual functionality for other extensions.

For Box, it will remove the contextual menu items and the badge icons, as well as replace the folder icon in the Finder sidebar and any application Open/Save Dialog boxes.

For Dropbox and GoogleDrive, it will just replace the folder icons in the sidebar and dialog windows, but doesn't stop their extensions from working.

Any suggestions on how to keep our FinderSync extension from having these adverse impacts?

I notice that GoogleDrive's contextual menu shows up in Dropbox folders, so I know that a folder can be watched by more than one extension.

However, it seems to not play nice and occasionally replaces the folder icons with the apps icon and removes contextual functionality for other extensions.

Yeah, that’s kinda how it works.

FinderSync extensions are not a general-purpose Finder extension mechanism. They were created to support… well… as the name suggests… syncing products like the ones you referenced. Such products typically ‘own’ the directory they’re syncing, and thus arbitrating between multiple extensions wasn’t part of the original design. Sometimes things work OK, and sometimes things fail badly.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Are there any best-practices, or additional hints, to improve compatibility?

Not from me, alas. You could try opening a DTS tech support incident and talk to our Finder Sync extension specialist. Everything I know about this I learnt from watching such responses go by (-: and I see a lot of folks running into this issue )-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I notice that Google Drive uses NSFileProviderCustomAction in some of their helper scripts, and wondering if this is another way to add contextual menus to files/folders in the Finder? Their contextual menus don't seem to be affected like Dropbox's do, which uses FinderSync.

I can't find any examples of how to use the NSFileProviderCustomAction approach. Is this a red herring, or is it another way to add contextual menus in the Finder? Any sample code to use to get started?

FinderSync extension not playing nice with other Finder extensions and folders
 
 
Q