Posted on Wed 05 February 2020

My favourite iOS libraries

Over time I've developed a list of open-source iOS libraries that I use in almost all my projects. These are my favourite, go-to libraries:

TableKit

Declarative table views! I hate the boilerplate involved in UIKit table views and having to work with index paths to make sure you're acting on the right cell. With TableKit, you have a reference to the cell when you work with it, and most of the design and logic goes inside the cell subclass itself anyway. It's a much neater way to work.

PromiseKit

I struggled a lot to get my head around promises at first, but now that I understand them I love using PromiseKit. There are things I can do in PromiseKit that I haven't found a way to do in Combine yet, and I find the syntax really simple now.

SnapKit

I barely ever use Auto Layout without syntactic sugar. I really like Stevia and Bamboo but because I've used SnapKit the longest, it's the one I usually reach for. The downside is each view has to have its constraints applied inside a closure, which makes the code more verbose than something like Bamboo or Stevia. But it's also a robust library that's been around for a long time and is used by lots of people, while the other two are smaller and lesser-known.

GRDB

I love using GRDB in any iOS app that needs a database. It's a very Swifty wrapper around SQLite, and even supports live updating via Combine already. The support and documentation are also fantastic.

KeychainAccess

This library has a really simple API for using the keychain. It works on Mac, as well, which I found really handy when I had to rewrite a Safari extension as a Mac app recently.

EasyStash

I recently started using EasyStash for simple caching and I've found it works great. In my newer side projects I'm using Swift Package Manager for all my dependencies where possible. EasyStash didn't support SPM but I submitted a PR and it was accepted quickly, so I'm using it all my new projects going forward.

Nimble

Although I don't use Quick in my testing anymore, I love using Nimble on its own for writing easy to read assertions in tests.

Quick shout-out to EarlGrey (1.x) and Sencha (a syntax wrapper for EarlGrey) which have been my go-tos for UI testing until now. Unfortunately EarlGrey 2 doesn't support the same kind of white-box testing without a hacky process of making my production available to the tests, so I'm not using these going forward. (If you know of an alternative I'd love to hear about it: @bellebcooper)


P.S. I make some stuff you might like: Exist, a personal analytics app to help you understand your life, Larder, a bookmarking app for developers, and Changemap, a roadmap and changelog for transparent teams.

© Belle B. Cooper. Built using Pelican. Theme by Giulio Fidente on github, edited by Belle B. Cooper. Theme inspiration from Jordan Smith and DuoTone snow theme.