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.