Swift parameter packs - Implementing a lightweight dependency injection
Dependency injection is key to app development as it enables developers to benefit from modularity throughout the codebase while facilitating unit testing. Although there are many good libraries such as...
Swift (peer) macros
Macros are a new Swift feature, part of the Swift standard library (currently available with Xcode 15 beta) to generate repetitive code at compile time. A macro will add new...
Combine - collect()
collect() is a powerful operator that enables us to receive all at once the outputs from a publisher. It collects all received elements, and emits a single array of the...
Swift Package Manager - Integrating resources
Declaring resources Resources can be bundled with a Swift package and then be accessed in your code. We can distinguish two types of resources : common resources (e.g interface builder...
SwiftUI - Creating a custom @Environment
SwiftUI enables us to access common pieces of information throughout the app using @Environment objects avoiding the cumbersomeness of passing data through the views. There are many built-in environments such...