Replicated File Provider extension
Build a File Provider extension that syncs the local copies of your files with your remote storage.
Overview
When creating a replicated File Provider extension, the system takes responsibility for managing and storing the local copies of your documents and folders. Your extension syncs data between the local copy and the remote storage, providing the local system with the metadata and contents of the items in your remote storage. It also alerts the system to any remote changes to those items and uploads any local changes back to the remote storage. For more information, see Synchronizing the File Provider Extension.
At a minimum, the File Provider extension needs to perform the following:
Adopt both the NSFileProviderReplicatedExtension and the NSFileProviderEnumerating protocols. You can add additional features by implementing the other protocols listed in the File Provider protocols listed below.
Implement an object that adopts the NSFileProviderEnumerator protocol to enumerate the items from your remote storage when the system calls your enumerator(for:request:) method.
Implement a class that adopts the NSFileProviderItemVersion protocol to represent the items (directories and files) enumerated by your file provider.
Your File Provider extension can add custom actions to the file browser’s context menu using the File Provider UI framework. You can also define custom services to communicate with the host app using NSFileProviderService. Use these interfaces to add features that aren’t provided by the base API.
Topics
Essentials
Synchronizing the File Provider ExtensionSynchronizing files using file provider extensionsSetting the Finder Sidebar Icon
File Provider protocols
NSFileProviderReplicatedExtensionNSFileProviderEnumeratingNSFileProviderIncrementalContentFetchingNSFileProviderPartialContentFetchingNSFileProviderServicingNSFileProviderCustomActionNSFileProviderExtensionActionIdentifierNSFileProviderThumbnailingNSFileProviderPendingSetEnumerator
Items and metadata
NSFileProviderItemFieldsNSFileProviderItemVersionNSFileProviderRequestNSFileProviderItemDecoratingNSFileProviderItemDecorationIdentifier
Domains
Testing protocols
NSFileProviderTestingChildrenEnumerationNSFileProviderTestingCollisionResolutionNSFileProviderTestingContentFetchNSFileProviderTestingCreationNSFileProviderTestingDeletionNSFileProviderTestingIngestionNSFileProviderTestingLookupNSFileProviderTestingModificationNSFileProviderTestingOperationNSFileProviderUserInteractionSuppressingNSFileProviderTestingOperationSideNSFileProviderTestingOperationTypecom.apple.developer.fileprovider.testing-mode