SwiftLee Weekly - Issue 281


This week's SwiftLee Weekly covers:

  • Snapshot testing and CI
  • A hidden Xcode 26 AI prompt
  • 10 + 1 tips on using Claude Code

Enjoy this week's SwiftLee Weekly!

THIS WEEK'S BLOG POST

Threads vs. Tasks in Swift Concurrency

Switching to Swift Concurrency if you've worked for years with GCD might make you struggle getting rid of the 'threading-mindset'. Tasks still result in work being done on different threads, but we don't directly manage them anymore. This article is an essential piece of learning and an example lesson of my full course. Enjoy!

SPONSORED

Transform Your Career with the iOS Lead Essentials — Limited Offer

Unlock over 40 hours of expert training, mentorship, and community support to secure your place among the best devs. Click now for early access to this limited offer and a FREE crash course!

CURATED FROM THE COMMUNITY

Approachable Concurrency in Swift Packages

I’ve mentioned the improvements in Swift 6.2 several times already, but I haven’t yet told you that it’s also available as Approachable Concurrency. This article by Keith Harrison tells you how to enable it for existing projects.
useyourloaf.com

ChatGPT in Xcode 26: there’s a hidden prompt!

Do you know how Xcode 26’s conversation with ChatGPT works behind the scenes?
swiftwithvincent.com

My 10 Tips for Using Claude Code

With many AI tools rapidly advancing in capabilities, any article that offers tips is a valuable resource to stay current.
samwize.com

Giving Claude Code Eyes to See Your SwiftUI Views

Talking about AI, what if you could give it eyes? I love this concept, whether you’re applying it for Claude or another AI tool.
twocentstudios.com

Icon Composer - Tackling Challenges

Did you finish your new app icon yet? The new Icon Composer app should become your go-to tool, but there are some challenges to overcome.
fatbobman.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.

WHAT I'm WORKING ON

The challenges of Snapshot testing on CI

Last week, I've spent several days on setting up CI for RocketSim. So far, I've been working alone and didn't need much of validation. However, adding new developers to my team made it a must to ensure stability (AI agents 👀).

I've had a classic week in which I did a lot, but felt like I did nothing. Setting up CI can be a slow process, especially if you constantly think "this is it" and you'll have to wait a few minutes for CI to complete.

Along the way, I learned a few things:

Let CI record your snapshots

Niek (our frontender) told me they're doing this on the web all the time. After some research, I found out that it's quite common on iOS/macOS development as well.

Funny though—after CI recorded the snapshots, they started to fail locally due to a mismatch in machines. CI is headless, non-retina, whereas I'm running on an M3 Max. However, it did allow me to validate the failures locally (crucial for productivity) and it turned out that they actually failed for good reasons.

For context, I've generated snapshots for all types of recordings for RocketSim. This includes validating App Store Connect export resolution, recordings with bezels, and screenshots of any Simulator with device bezels. The snapshots are either the screenshot or a frame of the output video.

These things I did wrong:

  • I did not respect retina scaling, resulting in different outputs on non-retina machines.
  • Uneven output resolutions got corrected by AVExportSession, but only sometimes.

The latter was frustrating to find out, but it did result in several important fixes to this core library of RocketSim. Eventually, it turned out it doesn't matter whether I record on CI or locally. Both suites complete successfully now, resulting in more stability securance.

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: 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...

This week's SwiftLee Weekly covers: @Animatable in SwiftUI Preparing for the future of App Development 6 Mistakes that slow down development Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Modern Swift Lock: Mutex & the Synchronization Framework While actors work great in Swift Concurrency, they're not always the best choice. You might not want to introduce the overhead of async/await in some cases, in which a Mutex with Sendable support can be a way out. SPONSORED Transform Your...

This week's SwiftLee Weekly covers: Vibe coding in Xcode 26 Extensible enums in Swift Designing UI with Liquid Glass Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Swift Concurrency & Swift 6 Course (Launch offer) After starting in March, I'm happy to announce the first completion of all 11 modules in my Swift Concurrency Course! You now have access to: 58 lessons 10 assessments 11 modules The final module has been great fun—it's been a result of migrating several packages to Swift...