Post

Replies

Boosts

Views

Activity

Programmatically Change Default Application to Open a File With
Finder allows the user to manually change the default 'Open With' application for a file by going to 'Get Info'. Is there a way to programmatically do this, for example, with AppleScript, in order to change the default 'Open With' application of specific files? My use-case is changing default 'Open With' application for files that are in a certain directory. I prefer the user doesn't have to do this manually.
2
0
1.1k
May ’22
Extended Attributes in File Provider Extension
I am developing a File Provider Extension on Mac. I am confused about how the extendedAttributes property works. The property never seems to be populated with any extended attributes. I've tried setting some custom extended attributes on my documents in testing, but they are never populated in the itemTemplates that are produced in the extension. The dictionary that would hold the extended attributes always is empty. I began to think that it only supported Mac-created attributes such as com.apple.quarantine. I then tried importing some files that are 'quarantined' with this appropriate extended attribute but still have not seen this data appear in my extension either. Any clarity here with what I should be expecting or what I should try would be helpful.
1
0
1k
May ’24
'iCloud' displayed when File Provider Item is marked as 'Shared'
I am developing a File Provider on Mac. I am marking some items within the domain as 'shared' via the NSFileProviderItemProtocol. However, the text 'Folder shared on iCloud by me' appears in Finder when these items are marked as shared. Is this correct? My provider has nothing to do with iCloud, which is, of course, the cloud developed by Apple. Is there a way to change this text or remove it? I've attached an image that shows the problem.
1
0
788
May ’24
How to immediately cause eviction for Item upon creation?
I am developing a FileProvider extension on Mac. I was wondering what the most reliable way to evict a document as soon as possible after createItem is called for the respective item. Our use-case for this is as follows: Users can 'bulk-import' items into a FileProvider folder, and we want our application to immediately evict the item as soon as possible once the item's content is uploaded to the server. This is to save space on the user's machine. So, what is the best way to accomplish immediate eviction after item creation? I've tried calling evictItem from within the createItem function itself, but that yields many errors and can cause slowness.
3
0
906
May ’24
File Provider Extension Fails to Launch but Still Appears on Side Bar
I am developing a Mac File Provider Extension. When testing installation from-scratch, The File Provider Name does appear on the side bar. However, the text '[App Name] encountered an unexpected error. Items may be out of date .....Try Again' appears at the top of the Finder window when opening the File Provider's Domain. Along with this text, there is a persistent 'Loading...' that is displayed in the middle of the Finder view. The File Provider seems to immediately get in a bad state. This does not happen at all during development. I am also noticing some logs in console that indicate some sort of issue. These 3 seem to be relevant. Any ideas or insight what could be going on? create-item(propagated:<root dbver:0 domver:<nil>>) why:itemChangedRemotely|diskImport sched:default.1717009685.233681#1717009069.3164978 error:<NSError: Cocoa 4101 "Couldn’t communicate with a helper application." Underlying={NSError: NSFileProviderInternalErrorDomain 7 "A connection to the extension “REMOVED ID” could not be made." Underlying={NSError: com.apple.extensionKit.errorDomain 2 "The operation couldn’t be completed. (com.apple.extensionKit.errorDomain error 2.)" UserInfo={(omitted)}}}}}>> → <requested:<p:root n:"i{31}e" dir child:0 m:rwxS ct:1717009068.969699 mt:1717009068.969699>> [duration 33ms44µs] Failed to create extensionProcess for extension 'REMOVED ID' error: Error Domain=com.apple.extensionKit.errorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x7fa0ce9d28b0 {Error Domain=com.apple.extensionKit.errorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x7fa0ce9d2ad0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7fa0ce9d33e0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo=0x7fa0ce9d2900 (not displayed)}}}}}} Launch failed with error: Error Domain=com.apple.extensionKit.errorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x7fa0ce9d2ad0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7fa0ce9d33e0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}}}
1
0
1.1k
May ’24
How to tell if FileProvider Extension is enabled, programatically?
I tried using Pluginkit via terminal to determine if a File Provider Extension is enabled on Mac OS. Although I see the extension listed in the output of pluginkit -m, The status of + or - doesn't seem to change in this output when I disable or enable the FileProvider extension in System Settings. Is there a more reliable way to determine if the extension is enabled ?
1
0
138
May ’25
File Provider supportedServices
I am developing a FileProvider on Mac OS. I want to support Coauthoring Via Microsoft. As per Microsoft's documentation, the supportedServices function should be called via the OS when an Office file is opened. I have overridden this function in my fileprovider extension, but fail to see this function getting called. Has anyone else had any experience with coauthoring integration for File Provider and could give some advice? I am mostly working from the given documentation from Microsoft https://learn.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/plus/sync-client/metadata
2
0
128
Jun ’25
Still being asked to allow keychain access even when allowing all applications to access item.
During our build process for our mac exe, there is a point where we run our newly built executable as a test. This executable tries to access the login keychain as part of our test. On the particular keychain item it is trying to access, we have selected to "Allow all applications to access this item". Even with this enabled, every new build and run of this exe is prompting that we "Allow Access" for this exe to access the keychain item. This requires manual intervention for each new build to continue running. Any ideas as to what we can do to stop the prompting? We can avoid accessing the keychain during this test process, but I'd rather not remove testing that we have been doing for a years. For background, this started a few weeks ago and was not a problem until recently. We also don't do any code signing of the exe in this process.
0
0
457
Mar ’23
File Provider Delete Enumerated Folders
I am developing a file provider extension on Mac. I noticed when attempting to delete an enumerated folder with didDeleteItems, passing only the top-level folder's ID is not enough to delete the item. It seems we need to pass all items underneath as well to this function for the folder to be removed. Is there a way around this? The way our application is designed makes it challenging to do this and we would prefer being able to remove the folder by utilizing the item ID only. If not, how could we obtain the particular items underneath that should be passed in to the function?
2
0
643
Aug ’24