SwiftLee Weekly - Issue 322


This week's SwiftLee Weekly covers:

  • Indirect enum cases in Swift
  • Unexpected Task suspension points slowing down your apps
  • 63% fewer tokens used to navigate the Simulator using Agents

Enjoy this week's SwiftLee Weekly!

THIS WEEK'S BLOG POST

Unexpected Task suspension points in Swift Concurrency

I'm using Swift Concurrency heavily in my apps, but I'm still learning every day. This time, I ran into an unexpected suspension point that seemed innocent, until I executed the related task many times in a short period. The mistake and solution are already merged into my Swift Concurrency Agent Skill, but I highly encourage you to understand the problem first yourself by reading this week's article.

SPONSORED

Stop waiting. Start shipping.

Shared runners, queued jobs, throttled Xcode builds — CI shouldn’t slow you down. Flow Swiss gives you dedicated Apple Silicon machines, yours alone. No noisy neighbors, no limits — just raw Mac mini and Mac Studio performance in the cloud, ready in seconds. New Xcode dropped? You’re ready day one. Learn more.

CURATED FROM THE COMMUNITY

Scheduling and handling background app refresh in SwiftUI

What if you could update your app’s data while it’s in the background, preparing for when the user comes back? You can follow Natalia Panferova’s technique using background tasks in SwiftUI.
nilcoalescing.com

Understanding 'indirect' keyword in Swift - Recursive Enums Explained Clearly

Have you ever used an indirect enum case in Swift? If not, you should read this article by Sagar Unagar for sure!
sagarunagar.com

Synchronization in Swift: Actors vs Queues vs Locks → Livsy Code

Do you prefer Actors, DispatchQueues, or locks like NSLock? Artem Mirzabekian explains how to choose in practice.
livsycode.com

How to implement pagination with SwiftUI's List view

Learn how to fetch an initial page of results and then load more content as the user scrolls using Natascha Fadeeva’s technique in SwiftUI.
tanaschita.com

Six Years Perfecting Maps on watchOS

This is a fantastic story by David Smith of optimizing his Pedometer++ watchOS app’s Map functionality.
david-smith.org

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

iOS Konf and RocketSim 16.0

I'm writing this weekly issue from Skopje, Macedonia, while attending iOS Konf. It's an amazing conference so far, well-organized, and I can totally recommend going there next year.

Many talks cover AI-topics and it shows that we're shifting as a community to more AI-focused learnings. It's a great segue into what I've been cooking over the past weeks.

RocketSim's latest TestFlight introduced the first production-ready CLI and Agent Skill. It's trained on a collection of scenarios that I defined at the start, allowing me to compare it against popular tools in the space.

In our internal research, RocketSim’s CLI completed the same agent workflows about 19% faster, avoided wrong taps entirely, and used about 63% fewer estimated tokens than a popular alternative.

Obviously, it felt biased. So I was keen to get it in the hands of teams actually trying it out. Here's a quote of one of the early adopters:

I just tried and eeeee oh my god. it used almost noooo tokkkeeeens

I guess I'd love for you to try it out. The build is currently waiting for review, so either join the TestFlight or wait a few days. RocketSim is sandboxed and in the Mac App Store, which is a great way to get your company to allow using it and start using Agents to control the Simulator (See RocketSim for Teams).

Oh, and did I tell you that RocketSim now works with USB-connected devices?

UNTIL NEXT TIME

Continue your Swift development journey

I hope you've enjoyed this week's content. You don't have to wait till next Tuesday for more insights, I share every day on these channels:

Or earn lifetime access to RocketSim & my Swift Concurrency Course by becoming an affiliate of my newsletter.

Thank you so much for your support, and until next Tuesday,

Antoine

SwiftLee Weekly by Antoine van der Lee

Swift Evolution updates, 5 top community articles covering Swift development topics.

Read more from SwiftLee Weekly by Antoine van der Lee

This week's SwiftLee Weekly covers: SwiftUI Animations SwiftUI Performance Tuning Column breakpoints in Xcode Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Immediate tasks in Swift Concurrency explained Immediate tasks are new in Swift 6.2 and a useful tool when working with Swift Concurrency. You really only should use it when you truly know what it's doing, which is why I wrote this week's article in detail. SPONSORED Stop waiting. Start shipping. Shared runners, queued jobs,...

This week's SwiftLee Weekly covers: Apple Developer meetup during WWDC Draggable bottom sheet in SwiftUI Xcode Instruments x AI Agents Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Xcode Instruments Time Profiler: Improve performance with AI I'm a big fan of Xcode Instruments, but lately even more now that I found a good way to work with it using AI agents. In this week's article, I'll share you how I used it this week to gain 25x better performance for RocketSim's CLI. SPONSORED...

This week's SwiftLee Weekly covers: Network Optimization using AI Agents Lazy properties in SwiftUI? Kids & Vibe Coding Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Network Requests Optimization using Xcode’s Simulator & Agents This feature shipped silently a few months ago and I never got to talk about it in detail: prompt exports for Network Requests. SPONSORED Give your AI agent eyes and hands on iOS FlowDeck lets Claude and Codex tap, scroll, find bugs, and fix them — on the...