Topic

Optional

A browsable archive of writing and notes across the site.

Post

Testing Swift code that uses system singletons in 3 easy steps

Original: Testing Swift code that uses system singletons in 3 easy steps Original author @johnsundell Most apps built on Apple platforms lean on singleton-based APIs. From …

Post

Avoiding singletons in Swift

Original: Avoiding singletons in Swift Original author & Copyright @johnsundell “I know singletons are bad, but…” — you hear it all the time when developers are …

Post

Different flavors of dependency injection in Swift

Original: Different flavors of dependency injection in Swift Original author & copyright: @johnsundell In previous posts we’ve looked at several ways of using dependency …

Post

What is LLVM

What is LLVM? The secret behind Swift, Rust, Clang, and more Understanding how a compiler emits native machine code makes it dramatically easier to invent a new language or enhance …

Post

In-app purchase

If your app ships on the App Store, in-app purchase (IAP) is something you can’t really avoid. Last year’s spat between WeChat tipping and Apple put IAP in the …

Post

Dependency injection using factories in Swift

Original: Dependency injection using factories in Swift Original author & copyright: @johnsundell Dependency injection is one of the key tools for making code more testable. …

Post

Modularising Xcode projects

Original: Modular Xcode projects Author & Copyright @pepibumur Translator: @OgreMergO Building a modular Xcode project takes a real understanding of project structure and the …

Post

Handling non-optional optionals in Swift

Original: Handling non-optional optionals in Swift Original author & copyright @johnsundell Optionals are arguably one of the most important features of Swift, and one of the …