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

Charted | Global Economic Confidence in 2025, by Country 🌎

Wednesday, December 25, 2024

While emerging markets in Asia have the strongest confidence in the global economy looking ahead, European countries are most pessimistic. View Online | Subscribe | Download Our App FEATURED STORY

Top Tech Deals 🎅 Sony Headphones, iPhone Cases, 4K Projector, and More!

Wednesday, December 25, 2024

The season of giving is upon us. How-To Geek Logo December 25, 2024 Top Tech Deals: Sony Headphones, iPhone Cases, 4K Projector, and More! The season of giving is upon us. Happy Holidays! If you're

Why the Race to AGI is Humanitys Defining Moment

Wednesday, December 25, 2024

Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, December 25, 2024? The

Iran's Charming Kitten Deploys BellaCPP: A New C++ Variant of BellaCiao Malware

Wednesday, December 25, 2024

THN Daily Updates Newsletter cover The Data Science Handbook, 2nd Edition ($60.00 Value) FREE for a Limited Time Practical, accessible guide to becoming a data scientist, updated to include the latest

Software Testing Weekly - Issue 251

Wednesday, December 25, 2024

GitHub Copilot is free! 🤖 View on the Web Archives ISSUE 251 December 25th 2024 COMMENT Welcome to the 251st issue! In case you missed it — GitHub Copilot is free! The free version works with Visual

Daily Coding Problem: Problem #1647 [Medium]

Tuesday, December 24, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Square. In front of you is a row of N coins, with values v 1 , v 1 , ..., v n . You are

Sentiment Analysis, Topological Sort, Web Security, and More

Tuesday, December 24, 2024

Exploring Modern Sentiment Analysis Approaches in Python #661 – DECEMBER 24, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Exploring Modern Sentiment Analysis Approaches in Python What are the

🤫 Do Not Disturb Mode Is My Secret to Sanity — 8 Gadgets I Want To See Nintendo Make

Tuesday, December 24, 2024

Also: The Best Christmas Movies to Watch on Netflix, and More! How-To Geek Logo December 24, 2024 Did You Know Their association with the Christmas season might make you think poinsettias hail from a

😱 AzureEdge.net DNS Retiring Jan. 2025, 🚀 Microsoft Phi-4 AI Outperforms, 🔒 Microsoft Secure Future Initiative

Tuesday, December 24, 2024

Blog | Advertise | View Online Your trusted source for Cloud, AI and DevOps guidance with industry expert Chris Pietschmann! Phi-4: Microsoft's New Small Language Model Outperforms Giants in AI

Mapped | The Top Health Insurance Companies by State 🏥

Tuesday, December 24, 2024

In 13 US states, a single company dominates the health insurance market, holding at least half of the total market share. View Online | Subscribe | Download Our App Presented by: Global X ETFs Power