SwiftLee Weekly - Issue 250


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 article can be found on GitHub. I've started this repository to invite you to contribute new article ideas or feedback on existing articles.

SPONSORED

Screenshotbot: Scale up your snapshot tests, without the friction

Spending too much time maintaining snapshot tests? Screenshotbot works with your existing snapshot tests and stores your images. Say goodbye to Git LFS. Screenshotbot notifies you on pull-requests when snapshots change. Curious? Try out Screenshotbot!

CURATED FROM THE COMMUNITY

Noncopyable types in Swift

While I haven’t run into a situation of needing noncopyable types myself, there are cases where this Swift feature can be essential to prevent invalid states or conflicts. Well explained by Natalia Panferova.
nilcoalescing.com

Finding unused code with Periphery

Unused code is tech-debt you need to maintain while it’s wasted time. “it’s difficult to prune old unused code while keeping up the velocity of new features”, well said by Adam Wulf. The tool described in this article can help you clean up your codebase.
adamwulf.me

Exploring MLX Swift: Adding On-Device Inference to your App

Do you know what MLX stands for? It’s a machine learning framework by Apple specifically designed for Apple Silicon. Read this article by Rudrank if this sparks your interest.
rudrank.com

Xcode Library customization with SPM plugin

While many of us only use SPM to link packages, you can do much more. This article describes creating an SPM plugin that generates library content. Oh, and this article also reminds us of the LibraryContentProvider protocol, which is very interesting!
artemnovichkov.com

Understanding opaque types in Swift

I wrote about Opaque types before and even gave a few talks since it’s complex for many. This concise article by Natascha Fadeeva might help you better understand this topic.
tanaschita.com

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.

There have not been any state changes in the past 7 days.

QUESTION OF THE WEEK

What objectives might a Principal Engineer's role be asked to endorse?
Robin

Before I went indie in March this year, I had been a Staff iOS Engineer for 7+ years at WeTransfer. While the Principal level follows after, there's one thing both levels had in common: confusion about responsibilities.

I've seen senior developers struggling to be promoted to Staff, switching jobs, and getting hired as Principal Engineer. One company might qualify you as a Principal, while others feel like you're just starting.

I'd love to reference staffeng.com in this answer as it helped me to qualify the different Staff engineers we've had at WeTransfer. While it does not answer the question, it does inform you of the various types of Staff Engineers that exist at these levels.

A principal engineer typically operates at a strategic level, influencing technical direction, mentoring teams, and ensuring alignment between business goals and engineering solutions. This is a continuation of a Staff Engineer's responsibilities, and there are often just a few Principal Engineers who are divided by discipline and aim to work together.

If you’re aiming for a Principal Engineer position, start by familiarizing yourself with the role. Review job postings from various companies to understand what they value and expect from candidates in this position.

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: The end of Flutter? Losing £25,000 Time to drop support for older iOS versions? Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Sparkle: Distribution apps in- and out of the Mac App Store When I say 'Sparkle,' for some, it will immediately ring a bell. It's an open-source framework that's available since 2006 (!!) and the most used framework for macOS updates out of the App Store. This week's article might be a niche topic, but the process,...

This week's SwiftLee Weekly covers: Reverse-Engineering Xcode's Coding Intelligence prompt Speed up iOS Launch with fault ordering Running the camera in Xcode's Simulator Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST #Playground Macro: Running Code Snippets in Xcode’s canvas Xcode 26 introduces an integrated playground experience using the new #Playground macro. It's an absolute joy to experiment with your code right inside the editor. I've not been using Swift Playgrounds a lot,...

This week's SwiftLee Weekly covers: Default Actor Isolation macOS Tahoe & App Icons SwiftData or...? Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Default Actor Isolation in Swift 6.2 One of my favorite WWDC changes is the release of Swift 6.2. It comes with many updates to Swift Concurrency, including a new Default Actor Isolation build setting. In this week's article, I'll explain how it works and why it will make your migration to Swift 6+ so much easier. SPONSORED Want to Stay...