The problems with Core Data iCloud sync are <i>vastly</i> understated in this article.<p>> <i>"Yes, there are various problems"</i><p>Yes, chief among them that <i>it doesn't work</i>. I'm quite serious here. <i>No one</i> has gotten an iCloud-based Core Data store to withstand the actual multi-device usage it was designed for.<p>We're not talking about "works, but buggy". We're not even talking about "works but is a pain in the ass". We're talking "core features do not function". We're talking about "no known workarounds to bugs at the core of system that prevent it from working in any way that resembles the documentation".<p>And it hasn't worked since iOS 5.0, released almost two years ago. We have been through another major yearly update and <i>several</i> point updates, and <i>no</i> visible progress has been made on Core Data iCloud sync. The documentation has not improved, and with every point release developers go back and survey the situation only to find <i>more</i> bugs and <i>more and different</i> obscure error codes being emitted by the system.<p>Core Data iCloud sync would be bearable if it were just buggy. It would even be bearable if there was <i>forward momentum</i> on the vast amount of brokenness in it. But neither have demonstrated themselves.<p>But enough whining, let's address some points made by the article.<p>> <i>"Or you can allow offline editing and build your own custom conflict-resolution solution, which I can guarantee will make YOU very unhappy... iCloud can resolve this problem by letting your users edit data offline and resolving any merge conflicts automatically"</i><p>Yes indeed, why build your own conflict-resolution layer, which you will probably get wrong in horrible ways, when you can rely on a working solution?<p>Poignant question if there <i>was</i> a working solution. Author is describing an iCloud <i>that does not exist</i>. Core Data iCloud Sync conflict-resolution <i>does not work</i>, and when it does not work, <i>it has failure modes which result in the irrecoverable corruption of your entire data store</i>, and in combination with other iCloud bugs results in the <i>complete inability for your app to edit its iCloud bucket ever again</i>.<p><i>Ever again</i>.<p>I wish I didn't have to use so much italics here, but the point really must be made.<p>> <i>"even if your app has been terminated, the iCloud daemon can keep running and upload your data whenever it gets an opportunity"</i><p>> <i>"with CDIS, data is pushed into your app when it’s ready"</i><p>Indeed, these are the points for using iCloud over other competing cloud sync services on iOS.<p>But that's a little like saying the Ford Pinto has a really nice tape deck. It has this really neat, really useful feature <i>when it isn't exploding</i>. It's like saying dinner service on the Titanic is great - none of this matters when you <i>can't even get the boat to float</i>.<p>> <i>"And that they have really seasoned, very smart people working on that Core Data team. I can’t imagine Apple releasing something as ambitious as a distributed, decentralized database system without “thinking it through”."</i><p><i>But they didn't think it through</i>.<p>Author, you've been working with CDIS for the last two years. The technology behind it is neither mysterious nor is it secret. CDIS isn't broken because Apple can't write code. CDIS is broken because <i>it is architecturally unsound</i>.<p>Core Data iCloud Sync breaks down from a high level like this:<p>- You break each transaction into your database out as a diff. You store this diff in a directory that the iCloud daemon is syncing. Thus, all new diffs (called transaction logs by CDIS) are replicated to all devices. So far so good.<p>- It is trivially easy for a combination of devices (or really, just two) to generate a combination of diffs that <i>do not</i> playback to a consistent database state.<p>- In a normal world where CRUD operations are handled by a server with some understanding of the underlying data model, the server resolves conflicts as <i>the</i> authoritative data source, and thus consistency is maintained.<p>- In the world of CDIS, there is no authoritative server, nor is one device ever designated as the canonical state (this would be unrealistic, since devices get retired and lost, nor is there anything special about a device that makes it canonical). Instead, conflict resolution is left to each device, the implementation of which is broken. Which is to say, your CDIS-enabled database will work fine <i>until the moment two devices make conflicting changes</i>. At which point it is irrecoverably corrupted.<p>- The CDIS client's reaction to this is to revert your local copy of the database to its last known good state <i>and cease communicating with iCloud entirely</i>. This error occurs silently without either notification via UI (to the user) or API (to the developer). There is no way to query this state, and as of today the only visibility into this error is via console logging.<p>- Because the corruption has already occurred server-side, this means <i>all connected devices</i> using this store are all now disconnected from iCloud when using the app.<p>- As previously mentioned, there is no simple way to detect this error state via the API. Even if you <i>were</i> able to figure out that this has occurred, <i>there is no way to destroy your database and start over</i>. Due to bugs, lack of documentation, or architectural oversights, there is enough metadata about the database that the app cannot delete, that deletion of the store and its associated diffs do not put iCloud back to a clean state.<p><i>This</i> is why people are giving CDIS a lot of shit on the internet. Nobody seriously believes Apple is incompetent at programming, but even a mild dive into the underlying technology on which CDIS is based shows that this entire architecture is unworkable. It's not that <i>Apple</i> can't get it right, it's that they've committed to an architecture that <i>no one</i> can get right.<p>As someone who has spent the last few years neck-deep in iOS, who makes a living writing iOS apps, I <i>want</i> iCloud to work right. It is in my interest to cheer on Apple's every move. But short of <i>completely</i> scrapping their existing architecture I do not see how it can be meaningfully improved (read: made to actually work).<p>> <i>"CDIS is a really compelling technology for many iOS / Mac developers to adopt in their apps, and you should be seriously looking at iOS6 or iOS7 as the point to jump onto the CDIS train if it fits your needs"</i><p><i>NO</i>. I for one would be <i>ecstatic</i> if CDIS works as advertised in iOS7, but <i>under no circumstances</i> should anyone consider using CDIS on an iOS6 device.<p>> <i>"and it deserves less dismissiveness"</i><p>Dear author. We, the iOS developer community, have not acted with <i>dismissiveness</i> about CDIS. In fact we raced towards it with high hopes. We fought the scant documentation. We fought the bugs. We poured into the dev forums in droves. We helped each other and we shared our learnings.<p>We are angry now because we have <i>tried</i>. Nobody dismissed CDIS out of hand - the anger here comes from tens of thousands, if not hundreds of thousands, of collective man hours exhausted attacking this problem from every possible angle, and we are no further from where we were when CDIS first dropped in iOS5.<p>All of the points you make are valid in a universe where the technology you're talking about is <i>functional</i>. It would be <i>insanely great</i> to have a cloud-based data store that does conflict resolution for you, that updates in the background, that removes our responsibility for hosting it, that has no operational overhead on our part, and pushes instead of pulls. Indeed, those are all great reasons to use such a technology - <i>if it existed</i>.<p>But as it is no one can make a Core Data iCloud store stand up for more than an hour. And no one can recover a corrupt data iCloud database after it's fallen over. So unless you've figured out the solution to the above two problems, I'd kindly suggest that you stop treating the entire iOS developer base like ignorant, petulant children.<p>That was way longer and way angrier than I intended, but the article is really IMO nonsensical, and the author's tone that the iOS community has someone "dismissed" the technology or somehow not given it a fair shot, bothered me greatly.