SwiftLee Weekly - Issue 282


This week's SwiftLee Weekly covers:

  • A threading risk for Combine & Swift Concurrency
  • Flux pattern in Swift
  • A crash debugging experience

Enjoy this week's SwiftLee Weekly!

THIS WEEK'S BLOG POST

Combine and Swift Concurrency: A threading risk

Migrating to Swift Concurrency brings all kinds of insights. Last week, I found an unexpected crash in RocketSim, caused by a Combine pipeline. It resulted in some crucial insights for those using Combine with Swift Concurrency.

SPONSORED

Fastlane alternative - Codemagic CLI tools

Are you tired of Ruby and Fastlane installation issues? There's got to be a better way! Discover Codemagic open source CLI tools. It is not a drop-in replacement for all of what Fastlane does (screenshots for example), but we use it at Codemagic to build and publish iOS and Android apps, also versioning and device provisioning. View on GitHub.

CURATED FROM THE COMMUNITY

A Peek into My Debugging Process (With Real Examples)

You find a crash—how do you solve it? Pol Piella shares its journey, and it’s very close to how I would tackle issues in my apps.
polpiella.dev

Flux pattern in Swift

For those looking to get inspired by architectural patterns: meet Flux—an approach to a unidirectional data flow.
swiftandpizza.wpcomstaging.com

Uncertain⟨T⟩

What if uncertainty were encoded directly into the type system?
nshipster.com

Creating amazing loading animations with SF Symbols.

Before you start writing custom animations—consider SF Symbols. Especially if you’re able to target iOS 17+.
danielsaidi.com

Deciding between ‘let’ and ‘var’ for Swift struct properties

You’d say it’s hard to write an article just on ‘let’ and ‘var’. It’s something we use so often, you would say there’s nothing new to learn. I loved the creativity behind the @Readonly property wrapper!
swiftbysundell.com

SWIFT EVOLUTION

An overview of last week's Swift Proposal state changes. Check them out when they're in review, as it's your opportunity to influence the direction of Swift's future.

It's holiday season, no updates this week!

WHAT I'M WORKING ON

Core Data and Swift Concurrency

I've been giving conference talks for many years now and during COVID times I had one special talk given at NSSpain: Best Practices in Core Data. It was a pre-recorded video, since in-person conferences were not allowed.

This week, I've had a flashback. Since I'm diving into Core Data & Swift Concurrency, I had to go back to my Core Data Best Practices GitHub repository. So many learnings from the past that resurfaced!

I always have been enjoying Core Data (Yes, I'm probably an odd one out here). While working on the Core Data module for my Swift Concurrency Course, I went on a classic journey of writing complex solutions.

Why classic?

Well, I found out after two hours of writing custom actor executors using a managed object context that it's actually not really needed to make Core Data work with Swift Concurrency. I believe it's a true skill to realize and accept that the code you wrote can basically be thrown away.

I did not, I wrote down all my learnings and shared all the code in the lesson since I believe it's actually a useful insight for my students. The actor executor works great, I just think it overcomplicates things. Keeping code readable without hidden implementation details (like a custom executor) would always be my preference.

FYI: The Core Data course module will be released this Thursday, together with several Swift 6.2-related concurrency lessons. You can get the course here.

EARN ROCKETSIM LIFETIME

Share and Earn RocketSim Lifetime & a 1-on-1 coaching session

Apple has recognized RocketSim as an Essential Developer Tool in the Mac App Store, and now you can get lifetime Pro access by sharing your unique referral link!

How to get started:

[RH_REFLINK GOES HERE]

Rewards:

  • Earn your first reward after just 3 sign-ups!
  • Check your progress anytime using your referral dashboard.
  • The grand prize? A personalized 1-on-1 career coaching session!

Several subscribers have already claimed their rewards—will you be next?

Thank you so much for your support, and until next Tuesday,

Antoine

SwiftLee Weekly by Antoine van der Lee

A new SwiftLee article, code snippet, Swift Evolution updates, 5 top community articles, and a weekly answer to a question from the community to level up your Swift skills.

Read more from SwiftLee Weekly by Antoine van der Lee

This week's SwiftLee Weekly covers: Swift 6.2' new String Interpolation feature When should you use an actor? A better way of matching strings in tests You've might noticed I'm sending this out later than normally, and that's for a reason! It's Apple event day. Here are the most important links for this week: Xcode 26 RC 1 (Apple Silicon) Xcode 26 RC 1 And the most important date: September 15th is OS launch day! If you want your app's update to be available on day 1 of iOS, macOS, iPadOS,...

This week's SwiftLee Weekly covers: Dealing with Xcode migrations Debugging Swift Concurrency Controlling warnings in Swift Packages Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST @ViewBuilder usage explained with code examples It's one of the most used result builders in SwiftUI: @ViewBuilder. Even if you're new to this attribute—you're already using it if you're writing SwiftUI code. Unde SPONSORED Fastlane alternative - Codemagic CLI tools Are you tired of Ruby and Fastlane...

This week's SwiftLee Weekly covers: Raw Identifiers in Swift Using a WebView in SwiftUI Using App Intents correctly Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Swift Computed Property: Code Examples While this is a basic in Swift, there are some nice additions since recently. For example, you can now use async and typed throws in the getter of a Swift computed property. SPONSORED Full iOS coverage. Fast If your test suite is missing critical flows or isn’t up to date, you’re at...