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

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: SwiftUI Navigation Patterns Will AI replace app developers? Building crash-free apps Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST SwiftUI Lists: Present rows of data explained with code examples Many of the apps built using SwiftUI use lists in some way. You can add sections, selection, or use different list styles. This week's article shows an overview of possibilities, including one modifier you must apply to use a custom list background....

This week's SwiftLee Weekly covers: From Apple Design Award to Going Indie An Xcode feature that removed 66k lines of code What defines a Senior? Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST iOS App Development: How to get started? Many of you likely know how to build an iOS application, but perhaps you have friends who should know, yet aren’t sure where to begin. I’m frequently asked how to get started with app development, so I decided to write this article to help guide those...

This week's SwiftLee Weekly covers: SwiftLee 2024 In Review SwiftLee's Most Read Articles of 2024 What to expect from SwiftLee in 2025 Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST SwiftLee in 2024: Lessons learned and achievements Time flies when you're having fun! I truly started having fun after going indie in March of 2024: one of my significant achievements. This week's article reviews my lessons learned, achievements, and looks ahead into 2025. SPONSORED Screenshotbot: Scale...