Hello team,
I've been evaluating BoxCryptor for use as a replacement for sparse bundles (encrypted disk images) which I store in iCloud Drive and access exclusively from macOS.
I'm a big fan of the new BC client with File Provider integration, but it's clear from my testing with OneDrive and iCloud Drive that Apple are imposing some quite serious technical restrictions on the way that Boxcryptor is permitted to integrate with iCloud Drive. Frankly, I'm very impressed you've got it working as well as you have.
With OneDrive, Boxcryptor is able to connect itself and act as a standalone client. However, I see that with iCloud Drive you're forced to treat it as though it's local storage that lives within -/Library/Mobile Documents/com-apple-CloudDocs, with all push and pull requests to iCloud being done by macOS instead of Boxcryptor/File Provider. This is how it appears to me at least!
If I have an encrypted file in Boxcryptor, stored in iCloud Drive but not downloaded locally, opening the file in Boxcryptor will trigger iCloud Drive into downloading the file. There are then two copies of this file, one encrypted in com-apple-CloudDocs and one unencrypted in -/Library/CloudStorage/Boxcryptor-icloud. Changes to that file via Boxcryptor are then synced, detected by macOS and re-uploaded.
However, if Boxcryptor has a cached copy within -/Library/CloudStorage but the original iCloud Drive download has been purged, making it online only, any changes made via Boxcryptor result in a sync error saying that the original file cannot be found. If I manually download that file again myself using Finder in my iCloud Drive, I am then able to retry the sync from within Boxcryptor, the file is now there, the .bc changes and then gets re-uploaded by macOS.
My question is this: Is there a way to make Boxcryptor trigger the iCloud Drive download again in the scenario that the original encrypted file has been purged so that we can avoid these sync errors?
My concern is that iCloud Drive uses storage optimisation to purge downloads over time in order to free up disk space, and if it purges a load of .bc files which Boxcryptor expects to be there, I'm going to get multiple sync errors and have to manually download them all again myself to put things back to the way they're supposed to be.
It's incredible that Apple have managed to produce a File Provider API that works better with third party cloud storage than it does its own. I do like Apple a lot but the way they've implemented iCloud Drive is horrendous.
Keep up the good work!