I've made finder sync extension using instruction.
It displays in finder when I launch it directly from Xcode. But it is not visible when I run the main app. Is there some way to do it for sandbox app? In not sandboxed app I used the code:
NSTask *fseEnable = [[NSTask alloc] init];
fseEnable.launchPath = @"/usr/bin/pluginkit";
fseEnable.arguments = @[@"-e", @"use", @"-i", @"com.team.AppName.FinderSyncExtension"];
[fseEnable launch];
But it does not work for sandboxed. I tried:
[[NSWorkspace sharedWorkspace] launchAppWithBundleIdentifier:@"com.team.AppName.FinderSyncExtension" options:NSWorkspaceLaunchDefault additionalEventParamDescriptor:nil launchIdentifier:nil];
But It also did not work.
Probably there is some checkbox in project settings to do it. but I haven't fond it.
Also I've found probably sad news in the documentation.
After installing an app extension, a user must take action to enable it. Often, users can enable an extension within the context of their current task. If your extension is a Today widget, for example, users can edit the Today view in Notification Center to enable your extension. In other cases, users can use Settings (in iOS) or System Preferences (in macOS) to enable and manage the extensions they install.