Implement a file provider extension to let other apps access the documents and directories that are stored and managed by your containing app.
- iOS 11.0+Beta
If your app is primarily focused on storing and managing the user's documents, you can implement a file provider extension to give users access to their content while they are using other apps.
The file provider extension:
Creates placeholders for remote files, letting you download the files only as needed.
Intercepts coordinated reads from the host app, so that the file can be downloaded or updated from the remote server before the read occurs.
Triggers a notification after coordinated writes from the host app, so that the extension can upload the changes to the remote server, as needed.
Enumerates the stored documents and folders.
Executes actions on the stored documents and folders, such as importing, moving, renaming, or deleting items.
Other apps access the stored documents using either the
UIDocument classes. These classes provide a standard user interface for browsing and interacting with the stored documents and folders; however, you can add custom actions to the browser's context menu using the FileProviderUI framework.
You can also define custom message interfaces for your file provider. Use these interfaces to add features that are not provided by the base API. For more information, see NSFileProviderMessageInterface.