Post

Replies

Boosts

Views

Activity

Supporting move to trash in a file provider for macOS
I am trying to implement a file provider for macOS. I’ve been using the Fruit Basket demo project provided by Apple to help me figure out how this can be done. I have met with some success, in that I can get directories of files to show up.  I now want to be able to support being able to delete files. I can do this from the command line, however when trying to access the context menu for an item in my file system through the Finder, there is no option to delete or move the item to the trash. In the Fruit Basket demo project, any domains created there have the option to move their items to the trash through the Finder. So far, I have been unable to figure out why this works for Fruit Basket and not for my application. How can someone allow their file provider to support moving items to the trash? Note: The Fruit Basket project is designed to be built and run on macOS 12 (Monterey). I’m creating my file provider for macOS 11 (Big Sur).
1
0
1k
Aug ’21
Detect drive attachment on iPadOS
I have been able to develop an application for iPadOS that allows someone to select a folder from an external drive using UIDocumentPickerViewController. I can then get access to the folder selected by the user and read and modify its contents whenever necessary by saving off an application based secured bookmark. The application can function without the drive attached and having access to that bookmarked folder. However, if the drive was unattached and my application was running, I would like to have the ability to detect when that drive was reattached so that the application could perform any needed operations related to that folder. On macOS someone can potentially effect this kind of functionality by accessing the notification center for NSWorkspace and registering for the NSWorkspaceDidMountNotification to know that a device has been mounted. Then they can check to see if that is the desired device they want to monitor. I’m wondering how someone could possibly effect this same kind of behavior for iPadOS.
0
0
569
Aug ’21
Using Fruit Basket demo
I've downloaded the Fruit Basket demo project to get a better understanding of how to implement a file provider for macOS. From running the program and looking through some of the code, I believe I have a vague notion about what it does, only I'm still unsure about a lot of things. Where can someone find more information about how Fruit Basket is supposed to work and how it can be used?
2
0
2.3k
Feb ’22