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: ControlGroup in SwiftUI 1-on-1 with an app development expert My favorite books Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST How to develop an app for iOS Many of you probably know how to build an app for iOS, but many developers (or non-developers) out there don't! I decided to write an entry article to give those a kickstart. Book a 1-on-1 for app development questions As part of this, I'm happy to announce I joined Intro as an app development...

This week's SwiftLee Weekly covers: Can you land an iOS job within 1 year? Winning an Apple Design Award Open-sourcing Swift Build Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Parameterized tests in Swift: Reducing boilerplate code Are you using Swift Testing already? If not, you might start doing so after trying out parameterized tests. They're quite a game changer for my tests and a great way to reuse a single test case. SPONSORED FREE iOS Architect Crash Course for a limited...

This week's SwiftLee Weekly covers: Debugging the undebuggable Color mixing in SwiftUI Indie app launch learnings Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Network Link Conditioner: Simulating Slow Networking The Network Link Conditioner is part of Apple's additional Xcode tools and allows you to test your app under slow networking conditions. If you're testing your iOS apps for slow networking, there's a better alternative. SPONSORED Paywalls Made Easy – Superwall Huge apps...