SwiftLee Weekly - Issue 288


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:

And the most important date:

If you want your app's update to be available on day 1 of iOS, macOS, iPadOS, watchOS, and visionOS 26, you have about one week to go.

Good luck and enjoy this week's SwiftLee Weekly!

THIS WEEK'S BLOG POST

SwiftUI Toggle: A Complete Guide

A common UI element: toggles. This week's article tells you all about it, including an important accessibility consideration, different toggle styles, and how you can use a custom binding.

SPONSORED

Simple Tools for Network Debugging

Proxyman is a best-in-class native macOS app that lets developers capture, decrypt, and manipulate HTTP(s) requests and responses with ease. Trusted by over 250,000 developers worldwide, it provides powerful debugging tools—from breakpoints to local mapping—ensuring you spend less time troubleshooting and more time building great software. Get started.

CURATED FROM THE COMMUNITY

Swift Default Value in String Interpolations

Dealing with optionals in String Interpolation always felt cumbersome, but this new Swift 6.2 feature, demonstrated by Keith Harrison, will change that!
useyourloaf.com

Handling different iOS versions in a View body

Exceptions for specific OS versions are common these months, but sometimes tricky in SwiftUI views. Ralf Ebert shares a few great ways to deal with them.
swiftui-garden.com

When should you use an actor?

Well, when should you? If you doubt, it’s recommended to read this article by Matt.
massicotte.org

SwiftUI: Text Color & Concatenation

The Text element in SwiftUI can be styled in many ways. In fact, before reading this article by Anton Gubarenko I didn’t know there were so many ways!
antongubarenko.substack.com

Matching Strings In Unit Tests

I’m confident you’ll recognize the issue solved by this library from Sam Deane. It’s at least a pain I recognize from my failing tests!
elegantchaos.com

Using MainActor.assumeIsolated to Solve Legacy API Compatibility Issues with Swift 6

I love the journey shared in this article by Fatbobman. The concurrency migration leads to all kinds of warnings and errors, and you might find yourself revisiting this article’s solution soon.
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.

SWIFT CONCURRENCY COURSE

Limited-time offer ending this week

My Swift Concurrency Course now offers 65 lessons and 10 assessments. Hundreds of developers already started- and completed the course, many of which shared their certificates on platforms like LinkedIn.

Altogether, it's now a complete course and no longer work in progress. While I continue to update its contents, I do end the limited launch offer at the end of this week. This is your last opportunity to get a 20% discount—don't wait too long!

WHAT I'M WORKING ON

Post Holiday — Back to Business!

The past two weeks I've been enjoying a two-weeks holiday in the south of France. Quality time with the family, energizing for the remainder of the year.

While I always continue publishing articles and newsletter issues during my holiday, the rest of my projects kind of paused. You can imagine I'm thrilled to kick off coding again!

I'm putting priority on the following things:

  • A new free 5-day email course launching later this month
  • RocketSim's major macOS Tahoe update
  • New performance related lessons for my Swift Concurrency Course

Prioritizing between these is hard sometimes, but time-related events guide me forward. I also prefer adding low/high effort, low/high impact labels to issues, which helps me prioritize accordingly.

To end more specifically, I'll be working hard on the major release of RocketSim this week. If you didn't do so yet, join the TestFlight here.

EARN ROCKETSIM LIFETIME

Share and Earn RocketSim Lifetime & free Swift Concurrency Course access

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:

Several subscribers have already helped me reach more developers and gained free access to RocketSim Pro and my Swift Concurrency Course — 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: 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...

This week's SwiftLee Weekly covers: My Apple Design Workshop experience The end of Property Wrappers? Watch out for 30,000x slower Equatable conformance Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Property Wrappers in Swift explained with code examples I'm sure many of you are familiar with Property Wrappers, or at least, you've used built-in wrappers like @State or @Published. I've revisited this article and updated it to have a look at how they relate to Swift Macros and why...