Ensure file provider domains appear in finder sidebar

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2022-05-11 18:52:14 +02:00 committed by Claudio Cambra
parent 9a86bb2be3
commit dcd1628ce8
No known key found for this signature in database
GPG Key ID: C839200C384636B0
2 changed files with 5 additions and 2 deletions

View File

@ -16,7 +16,7 @@ import FileProvider
class FileProviderExtension: NSObject, NSFileProviderReplicatedExtension {
required init(domain: NSFileProviderDomain) {
// TODO: The containing application must create a domain using `NSFileProviderManager.add(_:, completionHandler:)`. The system will then launch the application extension process, call `FileProviderExtension.init(domain:)` to instantiate the extension for that domain, and call methods on the instance.
// The containing application must create a domain using `NSFileProviderManager.add(_:, completionHandler:)`. The system will then launch the application extension process, call `FileProviderExtension.init(domain:)` to instantiate the extension for that domain, and call methods on the instance.
super.init()
}

View File

@ -20,12 +20,15 @@
#include "fileprovider.h"
namespace OCC {
Q_LOGGING_CATEGORY(lcMacFileProvider, "nextcloud.gui.macfileprovider")
namespace Mac {
class FileProviderInitializer::Private {
public:
Private() {
domainIdentifier = @APPLICATION_REV_DOMAIN;
domainIdentifier = @SOCKETAPI_TEAM_IDENTIFIER_PREFIX APPLICATION_REV_DOMAIN;
name = @APPLICATION_NAME;
fileProviderDomain = [[NSFileProviderDomain alloc] initWithIdentifier:domainIdentifier displayName:name];
setupFileProvider();