SwiftLee Weekly - Issue 245


This week's SwiftLee Weekly covers:

  • Xcode's integrated code formatter
  • ARCtic Conference
  • Is Swift too complex?

Enjoy this week's SwiftLee Weekly!

THIS WEEK'S BLOG POST

MainActor usage in Swift explained to dispatch to the main thread

Swift Concurrency was brand new when I first wrote this article in 2023. This week, I revisited the article and brought it back up to date. One key learning I’ve added: @MainActor does not guarantee execution on the main thread.
avanderlee.com

SPONSORED

Transform Your Career with the iOS Lead Essentials — Black Friday Offer

This Black Friday, unlock over 40 hours of expert training, mentorship, and community support to secure your place among the best devs. Click for early access to this limited offer.

CURATED FROM THE COMMUNITY

Mastering Data Tracking and Notifications in Core Data and SwiftData

This article reminds me of the time I wrote many Core Data articles and is full of insights into how you can track data changes in both Core Data and Swift Data.
fatbobman.com

Prevent screenshot capture of sensitive SwiftUI views

Did you know you can mark SwiftUI elements on the screen to be hidden during a screen capture? This can be especially useful if you have sensitive content on-screen.
createwithswift.com

Apple’s Swift Format in Xcode

In Xcode 16, Apple quietly introduced the ability to format your Swift files using Swift Format. Note: This is not Nick Lockwood’s Swift Format, but Apple’s swift-format. This article describes how you can get started.
troz.net

Learning from open-source Swift language source code

Did you know you can check out Swift language source code? Jacob shares an example of the dump() method, but there’s more to explore.
x.com

Apple is Killing Swift

Is Swift too complex? Looking at this article and the examples of hacks in Swift’s codebase to solve specific issues makes you think it is. I feel like it will always remain a discussion among developers. My opinion? Yes, it has many complex features, but you don’t have to use them all, making your environment less complex.
blog.jacobstechtavern.com

THE GOING INDIE PODCAST

Episode two of season one is now available and features Hidde van der Ploeg. He's the developer behind the industry standard native Mac application for App Store Connect (Helm). I'm incredibly excited about this episode since he's a designer who taught himself to code, making him share unique development tips from a designer's perspective.

Major shoutout to this episode's sponsor: Adapty: Revenue manage­ment platform for mobile apps.

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.

MONTHLY FREE GIVEAWAY

Win a ticket for ARCtic Conference

Sauna, ice swimming, northern lights, and Swift: what do they have in common?

ARCtic Conference!

The World's Northernmost Apple Developers' Conference taking place from March 11th-13th 2025 in Oulu, Finland. This month's free giveaway allows you to win a ticket:

Join the ARCtic Conference Giveaway

QUESTION OF THE WEEK

Can you make your emails dark-mode friendly?
Anonymous

This was quite a timely question and I'm happy with it since I can give you some backstage insights.

You might have noticed layout issues over the past two issues. I switched my email provider to (Convert)Kit which required me to start over. I've used a self-hosted Sendy service for 5+ years, but it became more unreliable by the time my newsletter scaled to 20K+ subscribers.

The dark mode issues should now be fixed and I'm actually ramping up to be in a better place than before:

  • I made a new SwiftUI automation app for curating articles
  • You can now affiliate this newsletter (see bellow)
  • The design of this newsletter is slightly different, with an improved readability experience as a goal

I aim to make this the best newsletter in the community and 2025 will all be about ramping up its quality. Therefore, if you feel like something can be improved, feel free to reply directly to this email to get a personal reply.

Finally, the one asking this question asked how I made this email dark-mode friendly. ConvertKit, although an amazing tool, doesn't support this out of the box.

The key change I had to make was:

  • Adding custom CSS with a dark mode media query
  • Apply a :root color-scheme and supported-color-schemes CSS configuration

Slowly but surely, this newsletter will improve. Stay tuned!

Want to have your question answered next week? Ask your question via this form (anonymously)

EARN ROCKETSIM LIFETIME

Share and Earn Rewards

Apple lists RocketSim as an Essential Developer Tool in the Mac App Store, and now you can enjoy lifetime Pro access by spreading the word!

Share your unique referral link below with fellow developers who would appreciate my newsletter:

[RH_REFLINK GOES HERE]

Check your referral count anytime and track your progress toward earning your reward.

Thanks, and until next Tuesday,

Antoine

SwiftLee Weekly by Antoine van der Lee

SwiftLee Weekly keeps you up-to-date with the latest Swift Evolution proposals, delivers 5 handpicked articles from the community, and challenges your knowledge with a weekly question. Enjoy a monthly giveaway and dive into a fresh new article from SwiftLee every week. Plus, unlock $264 worth of exclusive discounts by subscribing.

Read more from SwiftLee Weekly by Antoine van der Lee

This week's SwiftLee Weekly covers: Dealing with in-app subscription billing issues Getting started with Swift Localization using SPM Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Swift Tutorials: Learn Swift with Easy-to-Follow Code Examples Since 2015, I've published over 250 articles. Yet, a good starting point didn't exist, and outside of search engine results, it's pretty hard to discover all the valuable content I've written. Therefore, I used this holiday week to publish an...

This week's SwiftLee Weekly covers: Noncopyable types in Swift Exploring MLX Swift Xcode Library Customization Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST SwiftUI Button: Custom Styles, Variants, and Best Practices SwiftUI provides different APIs to style buttons. You can use system styling using view modifiers or custom button styles. While writing this article, I learned about PrimitiveButtonStyle, which allows you to define both custom interactions and styling. New: Code for...

This week's SwiftLee Weekly covers: Exploring Apple Intelligence SwiftUI Design System Mutable let in Swift Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST SF Symbol: How to for Swift & SwiftUI Remember the days you've had to search for a specific icon all across the web? We can be blessed with the quality of SF Symbols, which we can use for free in our apps. This week's article covers everything around the 6,000+ symbols you can use, from animations and variants to creating custom...