Levelling up our Networking at Steamclock

Brendan Lensink • Oct 6th, 2021

On most mobile app projects, networking is a pain. Over the years our team members at Steamclock have tried a half-dozen different networking libraries, and each one tended towards some combination of common problems. Too often projects end up with one giant networking file, requests that require wrappers to handle simple JSON, and painful error handling when juggling global and local errors.

Three years ago, with Codable on the horizon, we concluded it may be time for something better. We started by brainstorming some core principles around a networking library:

  • Handle the simplest REST API calls with minimal code, while still having the extensibility to decode the gnarliest responses
  • Leverage Swift’s Codable protocols for automatic decoding and encoding
  • Avoid monolithic networking files and avoid wrappers
  • Straightforward global and local error handling
  • Add a little bit of magic, but only where it goes a long way

From there, we prototyped a humble little networking library. One by one, we started implementing it in our projects, refining and improving the library based on what we learned.

Now, after two years of refinement, we’re happily using Netable as our networking library of choice in most of our projects, including our popular game Two Spies.

Today, we’re thrilled to announce Netable 1.0. As with our other libraries, Netable is open source under the MIT license, and we are accepting pull requests over on GitHub.

Netable logo

Brendan Lensink • Developer