I have created working fileprovider, that works perfectly on my local machine. Codesigned in xcode, with our company sign certificate as Developer ID Application. No provisioning profile. Also notarized result dmg.
Works as expected on my local machine. But won't load on any other machine. Calling [NSFileProviderManager addDomain: ...], ends up with error: Error Domain=NSFileProviderErrorDomain Code=-2001 "The application cannot be used right now." UserInfo={NSLocalizedDescription=The application cannot be used right now.}
Code=-2001 should mean, that no file provider manager extension was found in an app bundle.
I have made a TestFileProvider application that is totally simplified File Provider example. This too does work only on my own machine.
Relevant code from app:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSFileProviderDomain* fileProviderDomain = [[NSFileProviderDomain alloc] initWithIdentifier:@"com.xxxxx.dwc.FileProvider" displayName:@"TestDomain"];
[NSFileProviderManager addDomain:fileProviderDomain completionHandler:^(NSError * _Nullable error) {
if (error)
NSLog(@"add domain: %@", error);
else
NSLog(@"add domain SUCCESS");
}];
}
There are also these errors, that are related, but I do not understand what are they implying neither how to fix:
kernel Sandbox: fileproviderd(448) deny(1) file-read-data /Applications/TestFileProvider.app
fileproviderd [ERROR] PluginRecord doesn't have container url for
fileproviderd [WARNING] No provider found with identifier (null) for calling bundle (null) on second attempt.
I'm clueless on how to fix this. Is this related to codesign ? Or is it necessary to start fileprovider with different method call ?