Finder Sync

RSS for tag

Enhance the Finder’s user interface by adding badges, shortcut menu items, and toolbar buttons using Finder Sync.

Posts under Finder Sync tag

54 Posts

Post

Replies

Boosts

Views

Activity

Try to change the privilege of server connected in Finder
Try to change the privilege of server connected in Finder. Here are my steps: Open Finder, click "Go", select "connect to server". After I connected to a server and the server itself is open for "read and write". Then the system generate a disk in Locations to the sidebar of Finder. Try to modify the files in the disk, but I find that I only have the permission to read. Checking the info of the disk, the info in "Sharing & Permissions" bar said that I can only read. Then I try to change the privilege from "Ready only" to "Read and Write" of the user I am using, but the system noticed "The operation can’t be completed because you don’t have the necessary permission". I have no idea of how to change the privilege.
0
0
665
Apr ’23
Read Extended Attributes with Finder Sync Extension
I'm working on adding a finder sync extension to an app. The app is not sandboxed. In essence, the app is operating on files located in folders that the user chooses, the app stores the status information in an extended attribute for each file. The extension needs to monitor these folders and and assign a badge according to the state indicated in the extended attribute. Everything is working fine, I can get the app and extension to communicate which folders to watch, I can manipulate the files with the app, setting the extended attributes and the extension is getting requestBadgeIdentifierForURL called. However, attempting to read the the extended attribute using getxattr() is blocked by the sandbox. I tried creating an app group and to store the folder urls as security scoped bookmarks in the group but this fails when trying to resolve the bookmark. In retrospect this makes sense since the security scoped bookmark is supposed to be used for accessing the same url by the same app in the same sandbox which is not the case when dealing with an un-sandboxed app and a sandboxed Finder Find Extension. I read somewhere (here: https://developer.apple.com/forums/thread/66259?page=2) from someone, quoting DTS on a similar issue that he can either communicate to the main app process to get the information or use document scoped security scoped bookmarks but I'm having trouble finding information about document scoped bookmarks and I'm not sure if it makes sense either. Thanks in advance Eyal
5
0
1.6k
Jan ’23
Accessing a file in the sandboxed main app, which was selected in a Finder Sync Extension
Hi there, I have a Finder Sync extension, which adds a simply entry to the context menu of the finder. When this option is clicked, the selected files (URL objects) are sent to the main app using a URL Scheme. When I attempt to handle them there (e.g. read/write, access information about the file) I get a permission error. This only happens when using files from anything but the Downloads/Music/Pictures/Movies (all the folders which I already have given access to) I know that this denying of permission when the user hasn't selected it is intended by the sandbox and that I can access them in the extension because they're selected, but this access gets lost as soon as I send them to the main app. I simply can't find a way to send these paths to the main app without losing the aforementioned access, is there any way to do this, or am I forced to request full disk access from the user?
1
2
2.5k
Sep ’22
Third party app sidebar icons not following accent colour on macOS 12.0
Hi, Since the macOS Monterey update, our app icon in the sidebar does not follow the accent colour set in the system preferences while all native icons does. The icons are provided using the iconset folder. The entry CFBundleIconFile appear in the app's info.plist pointing to the iconset file (.icns), as described here: https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW1. Does anybody know how to make those icons follow the accent colour set in system preferences. Many thanks
5
0
2.4k
Mar ’22
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.
3
0
1.7k
Mar ’22
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?
1
0
1.3k
Nov ’21
Is it possible to show an error dialog from with in a finder extension?
I would like to be able to display an error message if one of my context menu actions fails. I have tried doing something like this but it doesn't seem to work: (IBAction)contextAction:(NSMenuItem *)sender { NSAlert *alert = [[NSAlert alloc]init]; [alert setMessageText:@"A dialog"]; [alert setInformativeText:@"A message"]; [alert setAlertStyle:NSWarningAlertStyle]; [alert runModal]; [myFinderSync performMenuItemAction:(uint32_t)sender.tag]; }
3
0
1.3k
Oct ’21
MacOS Finder Sync Extension - icon badging problem
I've a main app and target finder sync extension. Finder sync extension is responsible to show Finder context menu and correct badging for items sent from main app. Sometimes it works. But if I restart machine or application, neither Finder context menu nor icon badging is appearing at all although both main app and extensions are running. It only appears if I relaunch Finder. I tried to kill Finder sync extension and launch after launching main app but not working.
3
0
790
Sep ’21
Try to change the privilege of server connected in Finder
Try to change the privilege of server connected in Finder. Here are my steps: Open Finder, click "Go", select "connect to server". After I connected to a server and the server itself is open for "read and write". Then the system generate a disk in Locations to the sidebar of Finder. Try to modify the files in the disk, but I find that I only have the permission to read. Checking the info of the disk, the info in "Sharing & Permissions" bar said that I can only read. Then I try to change the privilege from "Ready only" to "Read and Write" of the user I am using, but the system noticed "The operation can’t be completed because you don’t have the necessary permission". I have no idea of how to change the privilege.
Replies
0
Boosts
0
Views
665
Activity
Apr ’23
Create finder tag from command line
As of now the only way to create the Finder tag is from Finder preferences. I have a requirement to create the Finder tags programmatically either from Swift or from the shell script. I got the command to set the tag for any file. But did not find any option to create the custom tag from command line/swift
Replies
3
Boosts
0
Views
1.1k
Activity
Feb ’23
Extending Finder to change appearance
I wanted to add automatic color coding to finder, is there a way to write a plugin/extension that would let me do that?
Replies
1
Boosts
0
Views
876
Activity
Jan ’23
Read Extended Attributes with Finder Sync Extension
I'm working on adding a finder sync extension to an app. The app is not sandboxed. In essence, the app is operating on files located in folders that the user chooses, the app stores the status information in an extended attribute for each file. The extension needs to monitor these folders and and assign a badge according to the state indicated in the extended attribute. Everything is working fine, I can get the app and extension to communicate which folders to watch, I can manipulate the files with the app, setting the extended attributes and the extension is getting requestBadgeIdentifierForURL called. However, attempting to read the the extended attribute using getxattr() is blocked by the sandbox. I tried creating an app group and to store the folder urls as security scoped bookmarks in the group but this fails when trying to resolve the bookmark. In retrospect this makes sense since the security scoped bookmark is supposed to be used for accessing the same url by the same app in the same sandbox which is not the case when dealing with an un-sandboxed app and a sandboxed Finder Find Extension. I read somewhere (here: https://developer.apple.com/forums/thread/66259?page=2) from someone, quoting DTS on a similar issue that he can either communicate to the main app process to get the information or use document scoped security scoped bookmarks but I'm having trouble finding information about document scoped bookmarks and I'm not sure if it makes sense either. Thanks in advance Eyal
Replies
5
Boosts
0
Views
1.6k
Activity
Jan ’23
Accessing a file in the sandboxed main app, which was selected in a Finder Sync Extension
Hi there, I have a Finder Sync extension, which adds a simply entry to the context menu of the finder. When this option is clicked, the selected files (URL objects) are sent to the main app using a URL Scheme. When I attempt to handle them there (e.g. read/write, access information about the file) I get a permission error. This only happens when using files from anything but the Downloads/Music/Pictures/Movies (all the folders which I already have given access to) I know that this denying of permission when the user hasn't selected it is intended by the sandbox and that I can access them in the extension because they're selected, but this access gets lost as soon as I send them to the main app. I simply can't find a way to send these paths to the main app without losing the aforementioned access, is there any way to do this, or am I forced to request full disk access from the user?
Replies
1
Boosts
2
Views
2.5k
Activity
Sep ’22
I need development APIs for Apple for Artist
I am developing a statistics application for the artists of my record label, I have only seen development APIs for the platform, but I have not found Apple for Artist, does anyone know if these exist? Thanks.
Replies
0
Boosts
0
Views
987
Activity
Jul ’22
Adding functionality to the max Finder App
Is it possible to add functions and change the rendering of the Finder on a Mac Book? I assume it's some kind of extension? thanks if you can point me in the right direction
Replies
1
Boosts
0
Views
749
Activity
Jun ’22
How to Enable Finder Comments Tab Programmatically
Is there a programmatic way to show/enable Comments Tab from Swift? I currently have an app with a Finder Sync Extension displaying badges on Finder items. I am so open to any other programmatic suggestion such as Apple Script. Thank you.
Replies
3
Boosts
0
Views
1.3k
Activity
May ’22
Third party app sidebar icons not following accent colour on macOS 12.0
Hi, Since the macOS Monterey update, our app icon in the sidebar does not follow the accent colour set in the system preferences while all native icons does. The icons are provided using the iconset folder. The entry CFBundleIconFile appear in the app's info.plist pointing to the iconset file (.icns), as described here: https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW1. Does anybody know how to make those icons follow the accent colour set in system preferences. Many thanks
Replies
5
Boosts
0
Views
2.4k
Activity
Mar ’22
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.
Replies
3
Boosts
0
Views
1.7k
Activity
Mar ’22
FIFinderSyncController.isExtensionEnabled always returns False
I have a macOS app which uses a FinderSync Extension. I'm using FIFinderSyncController.isExtensionEnabled to determine if the Extension is enabled. When running on OSX 10.15 & 11.6, it works correctly. When running on a system with OSX 12.2, it always returns False. Anyone know why it would behave differently?
Replies
0
Boosts
1
Views
960
Activity
Mar ’22
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?
Replies
1
Boosts
0
Views
1.3k
Activity
Nov ’21
Is it possible to show an error dialog from with in a finder extension?
I would like to be able to display an error message if one of my context menu actions fails. I have tried doing something like this but it doesn't seem to work: (IBAction)contextAction:(NSMenuItem *)sender { NSAlert *alert = [[NSAlert alloc]init]; [alert setMessageText:@"A dialog"]; [alert setInformativeText:@"A message"]; [alert setAlertStyle:NSWarningAlertStyle]; [alert runModal]; [myFinderSync performMenuItemAction:(uint32_t)sender.tag]; }
Replies
3
Boosts
0
Views
1.3k
Activity
Oct ’21
MacOS Finder Sync Extension - icon badging problem
I've a main app and target finder sync extension. Finder sync extension is responsible to show Finder context menu and correct badging for items sent from main app. Sometimes it works. But if I restart machine or application, neither Finder context menu nor icon badging is appearing at all although both main app and extensions are running. It only appears if I relaunch Finder. I tried to kill Finder sync extension and launch after launching main app but not working.
Replies
3
Boosts
0
Views
790
Activity
Sep ’21