In its simplest form, iCloud is merely a special folder. It lives on the iOS device in /private/var/mobile/Library/Mobile Documents/. That folder hosts all application material that applications share to the cloud.
Applications have partial permission to read from and write to this folder. That permission is developer-specific. As with the password keychain, developers can share cloud data between applications.
For example, all apps developed by App Company X could share, view, and update the same document set. You cannot share data outside of your developer account. So my apps cannot see App Company X documents, and vice-versa.
The Mobile Documents folder is monitored by iOS. When files are modified, the device automatically uploads changes to the cloud. Those changes propagate out to all other devices registered to the same account. This is handled by a local OS service, and applications aren’t directly involved.
Instead, applications subscribe to a variety of classes and notifications that allow them to know when changes occur. They can then resolve conflicts to bring local data into harmony with the iCloud versions.
How developers do this is up to them. They may choose a “most recent change wins” strategy. Or they may combine changes in some other manner. It’s the application’s job to ensure that data presented on one unit matches the data on other units, so long as there is network communication available to handle that conformance.
The tricky bits happen when a user drops out of communication. For example, you might edit a to-do list on a plane, when you have no net access, while your partner updates his or her to-do list in another city. Developers have worked for months on strategies for combining those changes and updating their documents to honor edits from both parties.
In the end, there’s very little in the way of iCloud APIs. It’s really just a folder that is synchronized to offsite-storage. The trick will be how well developers think about different ways that distance, connection, and time can affect the way documents in that folder must adapt to user updates.
If you are into Cloud Computing, you might be interested in European Commission Framework Programme 7 (FP7) ICT Thematic Call: “Objective ICT-2011.1.2 Cloud Computing, Internet of Services and Advanced Software Engineering.” For more information just get in touch!