One of the slightly more hidden features of CloudKit, Apple’s cloud-based back-end service for applications, is that you can use it to synchronise content as well as simply query it. I use this approach to sync favourite search terms between devices in my app Yummy.
However, I found the process wasn’t as well documented as it might be. It’s all there, but it’s written as many man pages are: it makes total sense if you already know what you’re looking for. This post is my attempt to make the process clearer.