Swift by Sundell - Swift by Sundell Newsletter #22

View this email in your browser
The Swift by Sundell Newsletter
Issue #22 - June 2020

👋 Hi everyone

With just three weeks to go until the start of this year’s edition of WWDC, things are busy over here at Sundell HQ. Not only am I going through my regular routine of upgrading all of my projects to the latest Swift and Xcode releases (something that I always recommend doing in preparation for the new beta SDKs), I’m also building a brand new version of WWDC by Sundell â€” my dedicated website for covering Apple’s conference and the new technologies and APIs unveiled at it.

This year, that site will be even bigger and more ambitious than last year — with more guest writers, interviews, videos, and the same in-depth code-level coverage of the key conference announcements as last year. I can’t wait to show you the new site, which launches on June 17th, and it will once again be completely free and available to everyone around the world.

But for now, let’s get started with this month’s recap of everything that’s new on Swift by Sundell. Hope you’ll enjoy it, and if you have any questions or feedback, simply reply to this email.

 

📖 Weekly articles

For 172 weeks, I’ve been publishing a new article about Swift every Sunday. These articles were added during the past month:

 

The different categories of Swift protocols

Swift’s many protocols can, in general, be split up into four main categories. Let’s go through them, and how keeping them in mind can help us write well-formed protocols that are consistent with those found in the standard library.

 

Propagating user-facing errors in Swift

In this article we’ll take a look at a few techniques that can make it much simpler to propagate runtime errors to our users, and how employing some of those techniques could help us present richer error messages without having to add a ton of complexity within each UI implementation.

 

Avoiding deeply nested Swift code

This article contains a number of techniques that can help us make our code easier to read, test and maintain, by reducing the amount of indentation within it. It’s not just about code style, I promise.

 

Getting the most out of Xcode Previews for SwiftUI

Let’s take a look at a number of techniques, patterns, and ways of structuring UI code that can help us get the very most out of Xcode’s SwiftUI-powered preview system.

 

Designing reusable Swift libraries

My latest weekly article is about library development, and contains a few techniques and principles that can be good to keep in mind when designing and building reusable Swift libraries.

 

✅ Basics

With the Basics series, my goal is to build up a comprehensive library of articles that cover most of the core aspects of Swift and iOS development. This article was published during the past month:

 

Properties

Let’s take a look at a few examples of the various kinds of properties that Swift supports, and what some of their different characteristics are.

 

🎧 Podcast episodes

The Swift by Sundell podcast is a bi-weekly show featuring special guests from all around the Swift community. You can find it in your podcast player of choice, for example Apple Podcasts or Overcast. These episodes were published during the past month:

 

72: “Many layers of SwiftUI”, with Tobias Due Munk

Tobias Due Munk joined me to talk about using SwiftUI to build prototypes, how third party developers can extend SwiftUI’s built-in APIs in various ways, and to discuss the challenges of writing highly dynamic systems in Swift.

 

73: “Truly a general-purpose language”, with Kilo Loco

Kyle Lee, also known as Kilo Loco, joined me to go behind the scenes of Publish — the static site generator used to build Swift by Sundell. Also, how to make a code base accessible to new team members, learning from open source, getting started with Swift-based web development, and much more.

 

⭐ Swift tips

I love to share shorter tips, tricks and techniques with the community. You can now also find all of the tips that I’ve ever posted as mini-articles on the site! These are the tips that I shared during the past month:

 

Inferred generic type constraints

How generic type constraints can sometimes be automatically inferred by the compiler, enabling us to omit them within some of our function declarations.

 

Using test assertion messages as comments

Often when writing tests, we might want to add some additional information to our code, for example in order to give debugging hints in case of a future failure. Let’s take a look at how we can add such information using custom test assertion messages.

 

Building an Observable type for SwiftUI views

An example of building a reusable ObservableObject that makes it easy to observe a single value within a SwiftUI view.

 

Quickly replacing singletons with functions

Testing code that uses singletons may at first seem really difficult. However, thanks to Swift’s first class function capabilities, there are a few tricks that we can employ to make such code completely testable without having to introduce any new types or protocols.

 

đŸ“ș Videos

Swift Clips is a brand new series of shorter YouTube videos covering Swift tips and techniques. This video was published during the past month:

 

Key paths and functions

Let’s take a look at how Swift’s key paths work, and how they relate to functions — both in terms of what comes built into the language itself, and what kind of utilities that we can write ourselves to form some really nice convenience APIs.

 

➕ More to read and listen to

Special articles and podcasts that are not part of my regular schedule. Feel free to check them out if you’re looking for something new to read or listen to.

 

Making Xcode UI tests faster and more stable

In my latest guest article on the Bitrise blog I share my favorite tips and techniques for making UI tests easier to write and, perhaps more importantly, to maintain.

 

Why does Swift by Sundell not use any client-side JavaScript?

The story of why I chose not to use any client-side JavaScript when building the new version of Swift by Sundell, and why I thought that it was important to emphasize that fact on the website itself.

 

My origin story on the iOS Dev Discussions podcast

I joined my friend Sean Allen on his podcast to share my â€œorigin story” â€” that is, how I got started with programming, how writing and podcasting ended up becoming my full-time job, how I’ve been progressing through my career, and examples of the mistakes that I’ve learned from along the way.

 

Stacktrace

Stacktrace is a weekly podcast that I do with my good friend Gui Rambo, which used to be focused mainly on Apple news, but has since become much more developer-focused — with technical deep-dives and “behind the scenes” discussions on every episode.

 

😊 Until next time

That’s it for this edition! I hope you enjoyed this newsletter. I always love to hear your feedback, so feel free to either reply to this email, or contact me on Twitter @johnsundell. I read every single piece of feedback that I get, and I try to reply to as many people as I possibly can.

Thanks for reading! 🚀

- John

Copyright © 2020 John Sundell, All rights reserved.
You are receiving this email because you signed up for the Swift by Sundell Newsletter at swiftbysundell.com/newsletter.

Our mailing address is:
John Sundell
Wadowicka 6B/4 SKR 002 A4
KrakĂłw 30-415
Poland

Add us to your address book


Want to change how you receive these emails?
You can or .

Email Marketing Powered by Mailchimp

Older messages

Swift by Sundell Newsletter #21

Saturday, May 2, 2020

Your summary of everything new on Swift by Sundell - all articles, podcast episodes, tips and videos published during April 2020. View this email in your browser Issue #21 - May 2020 👋 Hi everyone In

You Might Also Like

📧 Building Async APIs in ASP.NET Core - The Right Way

Saturday, November 23, 2024

​ Building Async APIs in ASP .NET Core - The Right Way Read on: m​y website / Read time: 5 minutes The .NET Weekly is brought to you by: Even the smartest AI in the world won't save you from a

WebAIM November 2024 Newsletter

Friday, November 22, 2024

WebAIM November 2024 Newsletter Read this newsletter online at https://webaim.org/newsletter/2024/november Features Using Severity Ratings to Prioritize Web Accessibility Remediation When it comes to

➡️ Why Your Phone Doesn't Want You to Sideload Apps — Setting the Default Gateway in Linux

Friday, November 22, 2024

Also: Hey Apple, It's Time to Upgrade the Macs Storage, and More! How-To Geek Logo November 22, 2024 Did You Know Fantasy author JRR Tolkien is credited with inventing the main concept of orcs and

JSK Daily for Nov 22, 2024

Friday, November 22, 2024

JSK Daily for Nov 22, 2024 View this email in your browser A community curated daily e-mail of JavaScript news React E-Commerce App for Digital Products: Part 4 (Creating the Home Page) This component

Spyglass Dispatch: The Fate of Chrome • Amazon Tops Up Anthropic • Pros Quit Xitter • Brave Powers AI Search • Apple's Lazy AI River • RIP Enrique Allen

Friday, November 22, 2024

The Fate of Chrome • Amazon Tops Up Anthropic • Pros Quit Xitter • Brave Powers AI Search • Apple's Lazy AI River • RIP Enrique Allen The Spyglass Dispatch is a free newsletter sent out daily on

Charted | How the Global Distribution of Wealth Has Changed (2000-2023) 💰

Friday, November 22, 2024

This graphic illustrates the shifts in global wealth distribution between 2000 and 2023. View Online | Subscribe | Download Our App Presented by: MSCI >> Get the Free Investor Guide Now FEATURED

Daily Coding Problem: Problem #1616 [Easy]

Friday, November 22, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Alibaba. Given an even number (greater than 2), return two prime numbers whose sum will

The problem to solve

Friday, November 22, 2024

​ Use problem framing to define the problem to solve This week, Tom Parson and Krishna Raha share tools and frameworks to identify and address challenges effectively, while Voltage Control highlights

Issue #568: Random mazes, train clock, and ReKill

Friday, November 22, 2024

View this email in your browser Issue #568 - November 22nd 2024 Weekly newsletter about Web Game Development. If you have anything you want to share with our community please let me know by replying to

Whats Next for AI: Interpreting Anthropic CEOs Vision

Friday, November 22, 2024

Top Tech Content sent at Noon! How the world collects web data Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, November 22, 2024? The HackerNoon