SwiftLee Weekly
SwiftLee Weekly #282

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

Join 31,000+ Swift & iOS developers — free, every Tuesday, in 5 minutes.

No spam. One email every Tuesday. Unsubscribe in one click.

This week's blog post

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.

Learn more

Curated from the community

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.

Enjoying this issue?

Join 31,000+ Swift & iOS developers and get the next one in your inbox — free, every Tuesday, in 5 minutes.

No spam. One email every Tuesday. Unsubscribe in one click.