Give your simulator superpowers

RocketSim: An Essential Developer Tool
as recommended by Apple

Property Wrappers in Swift explained with code examples

Property Wrappers in Swift allow you to extract common logic in a distinct wrapper object. This new technique appeared at WWDC 2019 and first became available in Swift 5. It’s a neat addition to the Swift library that allows removing much boilerplate code, which we probably all have written in our projects. You can find … 

 

Increasing development effectiveness by recognizing repetition

Development effectiveness determines how fast and efficient you can work as an engineer. The more efficient you can make your daily flow of development, the better your results will be. If you know me, you know that I love automating repetitive tasks. I’m able to keep up with SwiftLee, my newsletter, SwiftLee Jobs, and RocketSim … 

 

Presentation tips for performing professional Swift talks

Presentation tips can help you perform professional Swift talks by making sure you’re well prepared and professional-looking. Last week, I gave a talk at SwiftLeeds, and I realized all my experience from 5 years of talks at multiple conferences and meetup talks was a bit lost. You might not know, but I initially started writing … 

 

Nonisolated and isolated keywords: Understanding Actor isolation

SE-313 introduced the nonisolated and isolated keywords as part of adding actor isolation control. Actors are a new way of providing synchronization for shared mutable states with the new concurrency framework. If you’re new to actors in Swift, I encourage you to read my article Actors in Swift: how to use and prevent data races … 

 

EXC_BAD_ACCESS crash error: Understanding and solving it

Building apps all goes well in the beginning. You’re developing an app from scratch; it’s stable and runs perfectly fine. After releasing the first version, you get your first insights into crashes, from which one marks an EXC_BAD_ACCESS error. At this point, it’s time to start your journey into solving the crash. The first challenge … 

 

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 used when developing multi-threaded applications and are the root cause for several kinds of exceptions, including the well-known EXC_BAD_ACCESS. By understanding the differences between them, you’ll learn how to solve and prevent them in your … 

 

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 C language written code. It was first introduced in Xcode 8 and can be a great tool to find less visible bugs in your code, like data races. At WeTransfer, the Thread Sanitizer helped us … 

 

PassthroughSubject vs. CurrentValueSubject explained

PassthroughSubject and CurrentValueSubject are two types from the Combine framework that conforms to the Subject protocol. Both are very similar but have a few keys differences that are important to know. You can see them as custom publishers, but the main difference is that they are a little easier to work with. If you’re new … 

 

@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 introduced, many examples used a user defaults wrapper as an example. It’s a common use case where you can move boilerplate code into a wrapper. Although the @AppStorage wrapper is working out great in many … 

 

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 is part of the async-await concurrency changes allowing async properties to throw errors. By defining throwing computed properties, we better handle unhappy flows without defining methods for simple accessors—the same counts for custom subscripts that …