Post not yet marked as solved
Apps with File Provider extensions (com.apple.fileprovider-nonui) can add new locations to the Files app and inside these locations custom actions can be added to items using a File Provider UI extension (com.apple.fileprovider-actionsui).On iOS 13 and iPadOS these actions are shown in a context menu. The system actions all have an icon (SF Symbol) but I cannot find out how to specify icons for custom actions my app adds to this list and this makes my custom actions look out of place.Anyone know how to specify the icon for File Provider UI extension?
Post not yet marked as solved
I'm trying but failing to use the NSFileProviderErrorInsufficientQuota error code.Setting uploadingError on items to something like:let userInfo: [String:Any] = [NSURLErrorKey: NSURL(string: "https://my.domain.net/purchase-quota/")!,
NSLocalizedDescriptionKey: "Out of quota!"]
return NSError(domain: NSFileProviderError.errorDomain,
code: NSFileProviderError.Code.insufficientQuota.rawValue,
userInfo: userInfo)In the Files app there is a little "Upload Error" beneath the filename, but there is no way for the user to find out anything more.Looking through the "File Provider Enhancements from WWDC 2017" the speaker says that:In a persistent error case, like, for example, the user's out of quota,
what you need to do is tell the user, hey, you're out of quota. You got
to go and buy more quota on our web page. And in that situation, basically
what you give us is a, an error that suggests a recovery option.This hints at using recoveryAttempter on NSError and I tried something like:let userInfo: [String:Any] = [NSRecoveryAttempterErrorKey: TestErrorRecovery(),
NSLocalizedRecoveryOptionsErrorKey: ["Retry", "Cancel"]]This makes the Files app complain in the log thatException: decodeObjectForKey: class "Provider.TestErrorRecovery" not loaded or does not existprobably because the NSError is transferred from one process to another.It seems the File Provider framework has specific support for users being out of quota, but I cannot find any documentation or examples showing exactly how this can be used.Anyone know how to actually do something sensible when the user is out of quota?