Use “Mobile Documents” Folder To Sync Files with iCloud Across Macs

 

Hidden into Lion's ~/Library (which can be displayed in a variety of ways as we detailed in our Lion review) there's a Mobile Documents folder that's capable of syncing files across Macs configured with iCloud, Mac OS X Hints reports. Sure enough, the Mobile Documents folder is the directory iCloud uses for Documents & Data, a feature available both on iOS 5 and Lion. Mobile Documents is the same folder that contains data for apps that already work with iCloud, such as Instacast, iWork, or Galaxy on Fire 2.

What's interesting about this folder when used with two Macs under the same iCloud account is that it provides a basic "drop box" functionality for files that don't necessarily belong to an iCloud-enabled app. As you can see in my screenshot, the Mobile Documents folder contains data and sub-folders for App Store apps that work with iCloud. In order to follow Mac OS X Hints' suggestion, I tried to drop a few images directly in the folder -- as I'd normally do with Dropbox -- using my iMac. In a few seconds, those files were synced back to my MacBook Air. Both my iMac and MacBook Air use the same iCloud account, and have Documents & Data on. Clearly, those images didn't belong to an officially-registered iCloud app (such as Instacast), but the files were synced back and forth between the two machines.

So what we have here is a cool hack to use the Mobile Documents folder as a temporary Dropbox-like solution based on iCloud. This is interesting because Apple could technically prevent files that don't belong to a signed iCloud app from syncing across Macs, but decided not to, at least on 10.7.2. If you think about it, this could imply the company will offer some sort of iDisk replacement sometime in the future, or build a GUI for syncing documents back and forth between Macs manually. Or, it could be the foundation for an upcoming iWork for OS X update. Or then again, it could simply be a cool trick that won't receive any official support from Apple.

If you want to try the Mobile Documents sync (Mac OS X Hints claims the system even supports conflict resolution, which was suggested by John Gruber months ago), I'd recommend you make an alias of the folder, drop it onto your Desktop, and start dropping files into it. Make sure all your Macs are configured with a single iCloud account, and do not delete the documents & data that are already in there, or you'll lose precious app libraries, preferences, or saved states.

Finally, please note that even if files you'll sync won't show up in "official" iCloud apps, they'll still count against your iCloud storage.

Update: here's how you can use Mobile Documents with GoodReader for iOS.