Once-a-year Black Friday deals are coming. Read more.
Give your simulator superpowers

RocketSim: An Essential Developer Tool
as recommended by Apple

Issue 245
Nov 21, 2024

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:

{{subscriber.rh_reflink}}

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

Thanks, and until next Tuesday,

Antoine