SwiftLee Weekly - Issue 259


This week's SwiftLee Weekly covers:

  • Swift 6
  • ScrollTargetBehavior protocol
  • A major milestone for RocketSim

Enjoy this week's SwiftLee Weekly!

THIS WEEK'S BLOG POST

Swift 6: What’s New and How to Migrate

The release of Swift 6 caused quite some discussion for those migrating their projects. I've seen several conference talks with slides showing hundreds of warnings and compiler errors after initially switching to Swift 6 language mode.

It's time to help you get started with the migration after sharing background info and, most importantly, new features of this significant language version release.

That's not all: I've also started working on a dedicated Swift 6 & Concurrency course.

Join the Swift Concurrency Course waitlist

SPONSORED

Master Mobile Monitoring SwiftUI Apps

Monitor your app’s health with real-time insights into crash-free rates, start times, and more. Optimize performance and prevent user churn by addressing critical issues like app hangs, and ANRs. Learn how to keep your iOS app running smoothly across all devices by downloading this eBook.

ROCKETSIM MILESTONE

Celebrating 3000 RocketSim Pro Users with a 50% discount

Last week, I reached an incredible milestone: 3000 developers are now using RocketSim Pro through the App Store.

You'll get a 50% discount on RocketSim Pro to celebrate this special moment, but don't wait too long! This offer ends in 3000 minutes:

Get a 50% discount on RocketSim Pro

CURATED FROM THE COMMUNITY

Apple has open-sourced Swift's build system

I recently linked to this news, but what if you want to know more about one of Apple’s latest open-sourced projects? Vincent Pradeilles dives into more details.
swiftwithvincent.com

Presenting and Managing Expandable Sections in SwiftUI

Sooner or later your app will need expandable sections. Gabriel Theodoropoulos does a great job explaining how they work and builds up nicely to multiple expandable sections that work together.
serialcoder.dev

Build a macOS menu bar utility in SwiftUI

If you’ve been considering a macOS menu bar app, this article by Natalia Panferova will greatly help kickstart your project.
nilcoalescing.com

Mastering SwiftUI Scrolling - Implementing Custom Paging

Scrollviews and pagination—they’ve always been a challenge! Fatbobman explains why they’re complicated and how the ScrollTargetBehavior protocol can help.
fatbobman.com

Code completion in GitHub Copilot for Xcode is now generally available · GitHub Changelog

If you haven’t tried it out yet, it’s now time! GitHub Copilot for Xcode can level up your coding productivity. Even though Xcode has its predictive code completion in place, GitHub’s might be more complete.
github.blog

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.

CODE SNIPPET OF THE WEEK

Custom String Interpolation

You can find this post on Twitter/X, LinkedIn, or Bluesky.

QUESTION OF THE WEEK

When do you know a view is too complex and should be split to keep logic separate?
Danijela

You start a new SwiftUI View and it all looks good. A few more features, view elements, and buttons are added along the way. Two weeks later, your component is suddenly covering 400+ lines of code.

It's a debate many teams have when defining their SwiftFormat or SwiftLint configuration files. Should we throw a warning when a file becomes too long?

It's subjective to say a view is too complex or a file is too long. What I can say is that any component benefits from seperation of concern. If I ask you: "What is the single thing this view does?" and you find it difficult to answer with just one thing, you know there's a potential to split things up.

I sometimes feel bad to have a really small view component, but I always remind myself that this view might be a small seed that will slowly grow. Preparing your code for the future means looking ahead and make decisions early in the process.

Want to have your question answered next week? Ask your question via this form (anonymously) or reply to this email with your question.

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: 3 Indie Marketing Tips Using Task Local values for dependencies Will WWDC have a big impact? Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Testing push notifications on the iOS simulator Many apps support push notifications, but Xcode doesn't provide an easy way to test them in the Simulator. Your options are limited, and many developers reach out to their physical device combined with some kind of testing server. Luckily, there's a native Mac...

This week's SwiftLee Weekly covers: On-Device AI Models A single line that bricks your iPhone What happens if you don't know the answer? Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST SwiftUI ForEach Explained with Code Examples ForEach in SwiftUI is an essential element that we all use, but it can sometimes be confusing. The use of the Identifiable protocol is key, and an enumerated approach can help you make index-based adjustments for the presented content. SPONSORED What's the...

This week's SwiftLee Weekly covers: A first look at Swift 6.2 A code deprecation coming in iOS 19 Create MCP Servers in Swift Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Swift 6.2: A first look at how it’s changing Concurrency I'm currently preparing my Deep Dish Swift conference talk and diving deep into what's next for Swift Concurrency. Since Swift is open-source, we have the opportunity to look at the latest changes that are coming up next. A few of those relate to a new...