We are creating a Replicated FileProvider based application, where we need to change folder icons for root level folders.
I tried below two approaches.
This using NSFileProviderDecorations + Custom UTType, this changed the UI as shown:
This using Custom UTType, this had no UI change:
How can we change the default folder icon, to our custom icon?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
We are creating a Replicated FileProvider based application, where we want to handle different types of errors. As per doc: https://developer.apple.com/documentation/fileprovider/synchronizing-files-using-file-provider-extensions?language=objc#Handle-errors-elegantly
NSFileProviderErrorNotAuthenticated is a resolvable error, and once we report it, the system throttles the sync operation until something (most likely the app or extension) calls signalErrorResolved(:completionHandler:) to signal that the user or the server resolves the error.
But this is not happening in our app, see below the sample code snippet (showing just error related code to keep it concise):
NSProgress* MacFileProvider::modifyItem(....) {
NSProgress *nsProgress = [[NSProgress alloc] init];
nsProgress.totalUnitCount = NSURLSessionTransferSizeUnknown;
NSError *error = [NSError errorWithDomain:NSFileProviderErrorDomain
code:NSFileProviderErrorNotAuthenticated
userInfo:nil];
completionHandler(nil, 0, false, error);
return nsProgress;
}
Observed behaviour:
On making local edits to a file, though this function returns resolvable error, this function is being called multiple times with retry back-off interval. Also, this function is called when we edit other files as well.
Expected behaviour:
As we are returning resolvable error, system should have throttled the operation until we resolve the error. So, all sync operation should have stopped for any item.
Can someone please help understand this behaviour difference, and how to achieve the expected behaviour.
In FileProvider framework based app, is it mandatory to make the host-app sandboxed? I think, no, as Google Drive app is non-sandboxed.
But when removing sandboxing from my hostApp, even though mount is visible in Finder but extesnion is not being launched and Finder shows a error message saying "MyApp encountered an error. Items may be out of date."
And when I add app-sanboxing, then things work fine.
Can someone please help how can we remove sandboxing of hostApp and still make it work. Is there any specific entitlement we need to add, or any whitelisting needed for our Developer Team Id?