Returns the services provided by the File Provider extension that manages the item at the given URL.
The file URL of a document or directory.
A block that is called on an anonymous background queue. The system passes this block the following parameters:
If the request is successful, this property contains a dictionary with zero or more
NSFileProviderServiceName keys and their corresponding
NSFileProviderService values; otherwise, it is set to
If an error occurs, this property contains an object that describes the error; otherwise, it is set to
Use the returned services to perform custom actions defined by the services’ protocol.
To access the service:
Use the desired service’s name to get the
NSFileProviderService object for the service. This object can only be used to operate on the item specified by the
NSXPCConnection object from the service.
Set the connection’s
remoteObjectInterface property, using the service’s protocol.
(Optional) Provide any additional configuration for the connection.
resume on the connection.
Get the proxy from the connection’s
Call the custom action methods on the proxy object.
Listing 1 shows a sample implementation.
For more information, see Defining the Service’s Protocol.
Accessing File Provider Services
A service that provides a custom communication channel between your app and a File Provider extension.