Sub topic 17
iCloud Drive and Desktop & Documents
This chapter covers how iCloud Drive appears in the Finder, what changes when you turn on Desktop & Documents Folders, and how to avoid the problems that cloud-backed folders cause. It assumes you know the Home folder layout, how to move and copy items, and how the sidebar works from earlier chapters.
What iCloud Drive is
iCloud Drive is Apple's cloud storage service. It keeps a folder of files on your Mac and mirrors it to Apple's servers, so the same files appear on your other Macs, iPhone, iPad and at iCloud.com. In the Finder it appears as an item in the sidebar. If it is missing, open Finder > Settings > Sidebar and tick iCloud Drive.
Its real location on disk is inside your Library folder, at ~/Library/Mobile Documents/com~apple~CloudDocs. The Finder hides that path and shows a friendly "iCloud Drive" entry instead. You almost never need the real path, but it explains what you see in Terminal or in Go to Folder.
Each app that supports iCloud can also keep its own folder in iCloud Drive, such as Pages or Preview. These app folders appear next to the folders you create yourself.
Turning on Desktop & Documents Folders
Normally your Desktop and Documents folders sit in your Home folder and exist only on that Mac. With Desktop & Documents Folders turned on, macOS moves their contents into iCloud Drive and keeps them synced.
To turn it on:
- Open System Settings and click your name, then iCloud.
- Click Drive.
- Switch on Sync this Mac, then switch on Desktop & Documents Folders. Wording varies slightly between macOS versions.
After this, the Desktop and Documents items in the sidebar's iCloud section point to the synced copies. On a second Mac with the same setting, its Desktop shows the same files as the first Mac. Your old local folders are not duplicated. The Finder shows the iCloud versions in their place.
Files that live in the cloud
To save disk space, macOS can use Optimise Mac Storage. This setting is in the same iCloud Drive pane. When your disk runs low, macOS keeps only recently used files in full on the Mac. Older files stay in iCloud, and the Mac holds a small placeholder.
The Finder shows the state of each item with an icon:
| What you see | Meaning |
|---|---|
| Cloud icon with a down arrow | The file is only in iCloud. Click the icon or open the file to download it. |
| Circular progress indicator | The file is uploading or downloading. |
| No icon | The file is stored on your Mac and in iCloud. |
| Cloud with an exclamation mark | The sync failed for that item, often because of a name or space problem. |
Right-click a file to see Download Now or Remove Download. Remove Download frees disk space and leaves the file in iCloud. If you want a folder always kept on the Mac, right-click it and choose Keep Downloaded. This is useful before a trip with no internet access.
Deleting and moving in a synced folder
Because the folders are synced, deleting an item on one device deletes it everywhere. Items you delete go to the Trash on the Mac, and iCloud also keeps recently deleted files for a limited time. You can recover them from iCloud.com under Data Recovery. Do not treat this as a backup. It is a short safety net.
Moving a file from a local folder, such as ~/Movies, into iCloud Drive uploads it. Moving it out of iCloud Drive to a local folder downloads it first, then removes the cloud copy. For a large file this can take a while, and the Finder shows progress.
If you turn Desktop & Documents Folders off, macOS asks what to do with the files. The default behaviour is to leave the files in iCloud Drive and create fresh, empty Desktop and Documents folders on the Mac. The files are not lost, but they appear to have vanished from the Desktop until you copy them back. Check iCloud Drive for folders named Desktop and Documents and drag the contents out.
Common problems
- Not enough iCloud storage. The free plan is small (5 GB). When the quota is full, new files stop syncing and the Finder shows the error icon. Check usage in System Settings > iCloud, delete large files, or buy more space.
- Stuck on "Waiting". Items may stay in a waiting state if you are offline or the Mac is asleep. Check your connection first.
- Conflicting names. If two devices change the same file at once, iCloud keeps both and appends a number to the name of one copy. Compare the two and delete the one you do not need.
- Files in the Desktop clutter every device. Because the Desktop syncs, a messy Desktop on one Mac is messy on all of them. Keep the Desktop for items you are working on now.
- Long paths and unusual names. Very long names or certain characters can cause sync errors. Keep names short and plain, as the naming chapter recommends.
- Terminal and backup tools. Tools that read your files may meet placeholders instead of real data. The command below shows files, with a dataless placeholder marked in the flags column on recent macOS versions:
ls -lO ~/Library/Mobile\ Documents/com~apple~CloudDocsA file marked dataless is a placeholder. Open it in the Finder or use Download Now before processing it with a script.
Deciding what to sync
Syncing the Desktop and Documents is convenient, but it is not required. A sound approach:
- Keep active work and documents you need on several devices in iCloud Drive.
- Keep very large items, such as video projects or virtual machine images, in a local folder like
~/Moviesand back them up another way. - Use the same folder structure inside iCloud Drive that you would use locally, with the Active and Archive pattern from the planning chapter.
- Use Keep Downloaded for folders that must be available offline.
Tags also sync through iCloud, so a tag you set on one Mac shows on another. Smart folders, being saved searches, are stored per Mac unless you save them in iCloud Drive.
Exercise
You turn on Desktop & Documents Folders on your laptop. A week later you are on a flight with no internet, and a file in Documents opens with an error because it shows a cloud icon. What happened, and what should you have done?
Show answer
Optimise Mac Storage had removed the local copy and kept only a placeholder, since the file had not been used recently. Before travelling, right-click the folder (or the file) in the Finder and choose Keep Downloaded, then wait until the cloud icons disappear while you are still online.
Exercise
You switch off Desktop & Documents Folders and your Desktop appears empty. Where are your files, and how do you get them back on the Mac?
Show answer
They remain in iCloud Drive, in folders named Desktop and Documents. Open iCloud Drive in the Finder and drag the contents back to the new local Desktop and Documents folders, or leave them in iCloud Drive if you still want them synced.