Skip to content

Commit

Permalink
Add explainer to client interface
Browse files Browse the repository at this point in the history
  • Loading branch information
claucambra committed Jan 23, 2024
1 parent 3d08dfb commit 326cdb0
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ import NCDesktopClientSocketKit
import NextcloudKit

extension FileProviderExtension: NSFileProviderServicing {
/*
This FileProviderExtension extension contains everything needed to communicate with the client.
We have two systems for communicating between the extensions and the client.

Apple's XPC based File Provider APIs let us easily communicate client -> extension.
This is what ClientCommunicationService is for.

We also use sockets, because the File Provider XPC system does not let us easily talk from
extension->client.
We need this because the extension needs to be able to request account details. We can't
reliably do this via XPC because the extensions get torn down by the system, out of the control
of the app, and we can receive nil/no services from NSFileProviderManager. Once this is done
then XPC works ok.
*/
func supportedServiceSources(for itemIdentifier: NSFileProviderItemIdentifier,
completionHandler: @escaping ([NSFileProviderServiceSource]?, Error?) -> Void)
-> Progress {
Expand Down

0 comments on commit 326cdb0

Please sign in to comment.