On iOS, there is the File Provider API to create "virtual folders" (folders where the content is provided by an app). How could I do something similar on MacOS? If you wonder why I would want to do this, it's just that I'm trying to understand how cloud storage apps work.
PS: Sorry for bad English, I'm French.
The File Provider framework allows you to integrate your cloud storage into the file system on macOS. It uses new APFS features to allow on-demand downloads of user files and folders. The API is entirely in user space.
↳ androidx.core.content.FileProvider. FileProvider is a special subclass of ContentProvider that facilitates secure sharing of files associated with an app by creating a content:// Uri for a file instead of a file:/// Uri . A content URI allows you to grant read and write access using temporary access permissions.
In macOS Big Sur there is a NSFileProviderReplicatedExtension protocol which should "Replicate" the iOS NSFileProviderExtension.
The API appears to be working on macOS 11.3+ and Xcode 12.5 has brought back the required FileProvider Extension target. There is also a workaround in Xcode 12.2 to add the target manually.
During WWDC21 we also got some sample code from Apple, which should make the extension a bit easier to implement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With