Commit 01bc0da
committed
Cloud actions: iCloud Drive only, via FileManager ubiquity APIs
`NSFileProviderManager.evictItemWithIdentifier` etc. failed in
practice with `NSFileProviderErrorProviderNotFound` ("The application
cannot be used right now") — its host-side methods are reserved for
the app that *bundles* the FP extension, not third-party callers
like Cmdr. There's no public path for non-host apps to evict /
download arbitrary File Provider items; Finder uses private XPC.
The `FileManager.evictUbiquitousItem(at:)` /
`startDownloadingUbiquitousItem(at:)` APIs route through iCloud's
separate ubiquity infrastructure and accept any URL inside an
iCloud container. Switching to those works for iCloud Drive paths
and gives synchronous `Result<(), NSError>` (no completion-handler
machinery, no `objc2-file-provider` crate at all).
Effect:
- `Make available offline` / `Remove download` only show in the
context menu for paths under
`~/Library/Mobile Documents/com~apple~CloudDocs/`.
- For Dropbox / GoogleDrive / OneDrive / Box files the menu items
no longer appear — the user has to use the provider's own client
(or Finder). That's the honest state with public APIs.
- `is_in_cloud_storage` removed (was unused outside the now-deleted
fallback path); `is_in_icloud_drive` is the strict gate.
- `objc2-file-provider` dropped from `Cargo.toml`. Module-doc
comment in `cloud_actions.rs` records the dead-end so future
agents don't re-litigate `NSFileProviderManager`.1 parent 204fb28 commit 01bc0da
6 files changed
Lines changed: 101 additions & 204 deletions
File tree
- apps/desktop/src-tauri
- src
- commands
- file_system
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 160 | | |
164 | 161 | | |
165 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
| |||
0 commit comments