Contents

disconnect(reason:options:completionHandler:)

Disconnects the domain from the extension.

Declaration

func disconnect(reason localizedReason: String, options: NSFileProviderManager.DisconnectionOptions = [], completionHandler: @escaping  @Sendable ((any Error)?) -> Void)
func disconnect(reason localizedReason: String, options: NSFileProviderManager.DisconnectionOptions = []) async throws

Parameters

  • localizedReason:

    A localized string that describes the reason for disconnecting the domain.

  • options:

    Options for the disconnection. For a complete list of valid options, see Disconnectionoptions.

  • completionHandler:

    A block that the system calls after disconnecting the domain. The block takes the following parameter:

    error

    If an error occurs, this object contains information about the error; otherwise, it’s nil.

Discussion

Call this method to disconnect the domain from the extension. While the domain is disconnected, the user can continue to browse its content, but the extension no longer receives updates about changes.

Call the reconnect(completionHandler:) method to reconnect the domain.

See Also

Working with domains