I am running a similar code in FileProvider extension, which throws an notAuthenticated error if the user is not logged in. How do I make user to launch the parent app for the authentication?
func enumerateItems(for observer: NSFileProviderEnumerationObserver, startingAt page: NSFileProviderPage) {
if(isSignedOut){
observer.finishEnumeratingWithError(NSFileProviderError(.notAuthenticated))
return
}
}
And in the Finder it shows
The right corner has Sign in button how do get action control of that button?
Post
Replies
Boosts
Views
Activity
The goal is to get the current directory when user is browsing and get the updates from the server and populate using enumerateChanges.
There is no trigger natively from FileProvider Extension that I can make use of, if there is anything I missed please let me know.
I have also tried FInderSyncExtension and pointed it to the CloudStorage path, while it worked flawlessly in the other location but not in CloudStorage location
~/Library/CloudStorage/***-YYY
So, how do I get notified when user is browsing in my FileProvider Folders?
When I try to access keychain it failed with the error **-25308 ** errSecInteractionNotAllowed.
I understand that the FileProvider Extension doest have ViewController, but even when I created a storyboard , a VC for that , then accessing KeyChain using that ViewController also gave me the same error.
Is there any other alternative to get keychain password from FileProvider Extension?
My project has a base app which is manually signed, inside I have a FileProvider parent app and extension.
When things works elegantly in Xcode debug build when I run FP App. But, when I package it, the FileProvider can't mount, fails with a generic error on parent app
(Error Domain=NSFileProviderErrorDomain Code=-2001 "The application cannot be used right now." UserInfo={NSLocalizedDescription=The application cannot be used right now.}
Another generic error in FileProvider demon
fileproviderd(488) deny(1) file-read-data /Applications/XYZ.app/Contents/Resources/FileFP.app
How to solve this?
I tried this POC in enumerateItems delegate, which simulates paging.
Isn't it suppose to show the files as soon finishEnumerating upTo is triggered?
The files are shown only after finishEnumerating(upTo: nil) is called, if there are 20 pages then it will wait for 20 pages info then only the files will be listed in the Finder!
How to solve this?
or
Did I miss something?
func enumerateItems(for observer: NSFileProviderEnumerationObserver, startingAt page: NSFileProviderPage) {
if(page.toInt64() == 100){
observer.didEnumerate([FileProviderItem(identifier: NSFileProviderItemIdentifier(rawValue: "paging.txt"))])
DispatchQueue.main.asyncAfter(deadline: .now() + 15) {
observer.finishEnumerating(upTo: nil)
}
return
}
observer.didEnumerate([FileProviderItem(identifier: NSFileProviderItemIdentifier(rawValue: "a.txt"))])
observer.didEnumerate([FileProviderItem(identifier: NSFileProviderItemIdentifier(rawValue: "b.txt"))])
observer.didEnumerate([FileProviderItem(identifier: NSFileProviderItemIdentifier(rawValue: "c.txt"))])
observer.didEnumerate([FileProviderItem(identifier: NSFileProviderItemIdentifier(rawValue: "d.txt"))])
observer.finishEnumerating(upTo: NSFileProviderPage(100))
}
The existing project of Finder Extension is doing an amazing job in other paths but when I point it to the CloudStorage path the context menu doesn't show up. And no trace of what is going wrong any where (Xcode Logs, Console log, crash log, etc.)
Path Used:
/Users/<User>/Library/CloudStorage/FP-SomeDomains
Yes, even my first though was, it must be because of dataless file and folders. But unfortunately it not. There was no context menu presented from my Finder Extension even on real physical files and folders.