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: Default Isolation in Swift 6.2 The .ignoredByLayout() modifier in SwiftUI Optimizing Mathematical Computations in Swift Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Institutional Purchases: Understanding and Detecting Recently, I discovered a spike in total downloads of 25K installs. Yet, I did not see an unusual spike in trials or purchases. I decided to dive in and found out it was caused by something called Institutional Purchases. SPONSORED...

This week's SwiftLee Weekly covers: Testing SwiftUI views What's new in Swift 6.2? Using Model Context Protocol on iOS Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Universal Links implementation on iOS Do you know the difference between deeplinks and universal links? I can at least tell you that Universal Links offers a much better user experience. This week's article explains both differences and how you can implement them for your apps. SPONSORED Is Your Mobile CI/CD Pipeline...

This week's SwiftLee Weekly covers: 3 Indie Marketing Tips Using Task Local values for dependencies Will WWDC have a big impact? Enjoy this week's SwiftLee Weekly! THIS WEEK'S BLOG POST Testing push notifications on the iOS simulator Many apps support push notifications, but Xcode doesn't provide an easy way to test them in the Simulator. Your options are limited, and many developers reach out to their physical device combined with some kind of testing server. Luckily, there's a native Mac...