CloudKit, my own experience ☁️

Matheus Homrich
3 min readJul 18, 2023

--

I’ve been programming in Swift for 2 years and so now and for most of this time whenever I heard about CloudKit, it was not good.

A picture that I took from the clouds on a random day

In these 2 years that I programmed in Swift, the apps in the projects I worked on were made with either our own API or with Firebase as a backend. In the meantime, I also got the chance to work with other frameworks to persist data and also connect to the cloud.

This Medium is not meant to be an introduction or a tutorial on CloudKit but actually, just my experience learning how to use it and also the process of using it. In the past few months, I've joined a new company and got the chance to engage in new projects, during this period I had the opportunity to touch on CloudKit for the first time!

CloudKit Logo

As I said before, mostly everything I heard about CloudKit was that it wasn't that good and the documentation was weak, all I actually knew is that it was a relational database.

So let's talk about it!

Starting right off with CloudKit you'll learn that there is a console on the web that is going to help you work around your container and mostly everything you're capable of doing with the tool feature-wise.

The CloudKit console.

What I was really impressed with was the fact that it was really easy to learn how to perform the queries, from the "easy" to the "hard" ones it was actually pretty simple. CloudKit offers you a container that you connect to your app, from there you have a private and a public database, and you can control all these features from the console.

My focus here is basically to try to encourage people to use CloudKit, I believe it's a valuable experience to have. From my experience, I would say that since you're dealing with a relational database there are some cares you need to take to make the queries safer.

Now talking about the speed of queries and connectivity, I felt like the database could have a faster response, sometimes it was really quick but other times it felt like it would take more than it should. Maybe the time it took was due to the fact that we were using the Xcode Simulator or another outside factor but still, was noticeable.

Finally, I would say my experience with CloudKit was way better than I thought it would be from what I had heard before, it is simple and I think that for small applications it can work just fine, maybe for more robust projects you might want to look at other options but still keep your mind open for CloudKit.

I hope that for you reader I was able to give a big picture overview of what is the experience of using CloudKit, thank you for reading :)

Disclaimer: One thing you need to have to use CK is an Apple Developer Account which is something you pay yearly to have access to some exclusive Apple features.

--

--

Matheus Homrich

Computer Science Graduate and iOS Engineer at Instituto Eldorado de Pesquisas — Embracing every new experience and opportunity