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: How .ipa files can increase app security Optimizing user flows in apps Flexible SwiftUI user interfaces Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Swift Reduce: Combining elements into a single value Reduce is a typical functional pattern, a higher-order function that combines a collection into a single value cleanly and expressively. When I looked up how often I use it in RocketSim's codebase, I was quite surprised! Way more often than...

This week's SwiftLee Weekly covers: Structured spacing in SwiftUI Test scoping traits A great app that nobody knows about Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST SwiftUI Alert Guide + Code Examples A SwiftUI alert can be presented in several ways. In this article, we explore these common view modifiers, changing the default action of an alert, and a convenient error-presenting extension I prefer to use in my projects. SPONSORED Transform Your Career with the iOS Lead...

This week's SwiftLee Weekly covers: What's new in Xcode 16.3 and Swift 6.1? Static vs. Dynamic dispatching New: RocketSim AI Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST SwiftUI Grid, LazyVGrid, LazyHGrid Explained with Code Examples SwiftUI offers a Grid view, but it also comes with a LazyVGrid and LazyHGrid. Do you know when to use which? SPONSORED Discover the Top 10 Best Practices in App Distribution Appcircle seamlessly integrates the best app distribution practices into your...