Building a Scalable SwiftUI Architecture
Nov 28, 2019, 12:03 PM
As SwiftUI starts to make its way into production apps, the architectural debates are brewing again. It’s still early to know what works yet in SwiftUI, but in this post, I’d like to share my attempt in creating a scalable app in SwiftUI.
Creating Thread-Safe Generic Values in Swift
Oct 3, 2019, 3:19 PM
We're still waiting for coroutines in Swift several years in. In the meantime, we have many concurrency mechanisms to choose from. How do we know which one to choose? Let's examine each one and compare their performances.
Swift Dependency Injection via Property Wrapper
Sep 29, 2019, 10:37 PM
There are so many diverse use cases for Property Wrappers, but dependency injection in particular seems like a natural fit. In this post, we’ll explore how we can leverage this newly exposed feature of the language to achieve native...
SwiftUI, Combine, and Beyond
Aug 3, 2019, 7:15 PM
Now that the euphoria and dust has settled from WWDC 2019, it would be wise to take a step back and plan for the future. Here are small steps to begin your path towards the promise land of SwiftUI, Combine, and beyond.
Protocol-Oriented Themes for iOS Apps
Sep 29, 2018, 1:12 PM
Themes are usually downplayed as an after-thought instead of being an integral part of the development process. How many times have you inherited a codebase where the design team wants to tweak it, or business wants you to clone the app...
So Swift, So Clean Architecture for iOS
Apr 22, 2018, 6:03 PM
The topic of iOS app architecture has evolved a long way from MVC. Unfortunately, the conversation becomes a frameworks and patterns war. The reality is: Rx is a framework; MVVM is a presentation pattern; and so on. Frameworks and patterns...
Swifty Protocol-Oriented Dependency Injection
Apr 11, 2018, 5:34 PM
The key to dependency injection is protocols. From there sprouts many variations, flavours, and techniques. Although this is yet another dependency injection™ blog post, I would like to share a pure Swift, battle-tested DI implementation...
Thin AppDelegate with Pluggable Services
Feb 16, 2018, 1:24 PM
Many techniques have been tried to tame the AppDelegate beast, usually ending up in moving code into private functions or extensions. However, the AppDelegate is much more complex than just moving code around. In this post, let's examine a...
Protocol-Oriented Routing in Swift
Oct 1, 2017, 7:00 AM
There are hundreds of complex routing frameworks and libraries in iOS. Usually they're overly complex to retrofit into an existing app or they completely bypass Storyboards. In this post, I'd like to offer a simple, native-like routing...
Swifty Localization with Xcode Support
Jul 11, 2017, 3:00 PM
Localization in Xcode is handled with NSLocalizedString, but it is such a verbose and legacy-like API. There's a Swiftier way that still respects Xcode .xliff exports and comments.