Getir Mar 6, 2023

Building a Modern iOS Networking Library with Swift Concurrency

Article Summary

Emre Havan from Getir rebuilt their entire iOS networking stack from scratch. The result? A modern, async-first library that eliminated memory leaks and cut boilerplate code—but not without hitting some painful Swift concurrency gotchas.

Getir's iOS team rewrote their networking library to embrace Swift's modern concurrency model, Codable support, and better testability. The article walks through their architectural decisions, from protocol design to URLSession management, revealing both wins and unexpected pitfalls along the way.

Key Takeaways

Critical Insight

The team built a scalable, unit-tested networking library with async/await that's now powering Getir's iOS app, but learned hard lessons about Swift concurrency's non-obvious behaviors.

They also built a clever mock networking system for UI tests that loads JSON data dynamically, but that's apparently a story for another article.

Recent from Getir

Related Articles