Race condition vs. Data Race: the differences explained

Race conditions and data races are similar but have a few significant differences you should know. Both terms are often ...
Read More
Swift

Thread Sanitizer explained: Data Races in Swift

The Thread Sanitizer, also known as TSan, is an LLVM based tool to audit threading issues in your Swift and ...
Read More
SwiftXcode

@AppStorage explained and replicated for a better alternative

The @AppStorage Property Wrapper was introduced in SwiftUI to allow easy access to the user defaults. When property wrappers were ...
Read More
Swift

How to use throwing properties to catch failures in Swift

Throwing properties allow defining computed properties that throw an error on failure. SE-310 introduced this feature in Swift 5.5 and ...
Read More
Swift

Unwrap or throw: Exploring solutions in Swift

Unwrap or throw is a scenario in which we want to throw an error if an optional returns a nil ...
Read More
Swift

Async let explained: call async functions in parallel

Async let is part of Swift's concurrency framework and allows instantiating a constant asynchronously. The concurrency framework introduced the concept ...
Read More
Swift

Dependency Injection in Swift using latest Swift features

Dependency Injection is a software design pattern in which an object receives other instances that it depends on. It's a ...
Read More
Swift

Async await in Swift explained with code examples

Async await is part of the new structured concurrency changes that arrived in Swift 5.5 during WWDC 2021. Concurrency in ...
Read More
Swift

MainActor usage in Swift explained to dispatch to the main thread

MainActor is a new attribute introduced in Swift 5.5 as a global actor providing an executor which performs its tasks ...
Read More
Swift

Actors in Swift: how to use and prevent data races

Swift Actors are new in Swift 5.5 and are part of the big concurrency changes at WWDC 2021. Before actors, ...
Read More
Swift

Improve discoverability using Static Member Lookup in Generic Contexts

Static Member Lookup is extended to Generic Contexts since the release of SE-0299. It might seem to be a minor ...
Read More
Swift

Presenting sheets with UIKit using a UISheetPresentationController

WWDC 2021 introduced iOS 15 with many API changes, including improvements to presenting sheets in UIKit with the new UISheetPresentationController ...
Read More
Swift