Swift by Sundell - Swift by Sundell Newsletter #24

View this email in your browser
The Swift by Sundell Newsletter
Issue #24 - August 2020

👋 Hi everyone

July brought two quite significant changes to Swift by Sundell. First, the podcast has a new, tweaked format, with slightly shorter episodes each focused on a single main topic. Second, the podcast’s Q&A section has now been moved to the website instead — where I’m able to answer the community’s most commonly asked questions in much more depth and detail, along with code samples and more, all of which can then be searched and linked to with ease.

I’m continuing to tweak my work to try to provide as much value to the Swift community as I possibly can. Hope you’ll enjoy these changes, and like always, just can simply reply to this email if you want to send me any feedback. But now, here’s your summary of everything that was published on Swift by Sundell during the month of July.

 

📖 Weekly articles

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

 

A guide to SwiftUI’s state management system

Let’s take a closer look at each of SwiftUI’s state handling property wrappers, how they relate to each other, and how they make up different parts of SwiftUI’s overall state management system.

 

Opaque return types in Swift

An in-depth look at opaque return types, how they can be used both with and without SwiftUI, and how they compare to similar generic programming techniques, such as type erasure.

 

Five powerful, yet lesser-known ways to use Swift enums

An overview of a few somewhat lesser-known ways in which enums can be used to solve various problems in Swift-based apps and libraries.

 

Building custom Combine publishers in Swift

What goes into building a custom Combine publisher, and what sort of situations that might require us to do that.

 

🎧 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:

 

77: “Adopting new system features”, with Jordan Morgan

Jordan Morgan joined me to discuss various strategies for adopting new system features and APIs, how to keep up with the rapid changes to iOS, macOS and Apple’s other platforms, and how to allocate time between different projects.

 

78: “What’s new in Swift 5.3”, with JP Simard

JP Simard returned to the show to discuss Swift 5.3’s main new features and improvements, and what those changes might tell us about the current state of Swift and its evolution process.

 

✅ 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:

 

Type inference

An introduction to Swift’s type inference system, how it makes the syntax of the language so lightweight, and how to work around some of its limitations.

 

⁉️ Questions & Answers

Answers to common questions about Swift development, or about my work in general. These are the questions that I answered during the past month:

 

How can a SwiftUI Text with mixed styling be created?

SwiftUI does not (yet) have a built-in equivalent to NSAttributedString, so how can we style various parts of a text differently when building UIs using it?

 

How to pick between using a struct or a class?

Not just a question of value types versus reference types.

 

Why can’t certain protocols, like Equatable and Hashable, be referenced directly?

A few tips for working with generic protocols.

 

Is using [weak self] always required when working with closures?

Capturing self does not always cause a retain cycle, but it could, so here are a few guidelines that can be good to keep in mind when working with closures.

 

What’s my workflow for writing and publishing articles?

How I decide what topics to write about, and what my workflow looks like when writing and editing an article.

 

How to create an array with mixed types in Swift?

Multiple techniques for storing values of mixed types within a Swift array.

 

⭐️ Swift tips

I love to share shorter tips, tricks and techniques with the community. These are the tips that I shared during the past month:

 

Using an AppDelegate with the new SwiftUI-based app lifecycle

How to bridge the UIKit way of managing an app’s lifecycle with SwiftUI’s new App API.

 

Implicit capturing of self in Swift 5.3

How Swift now enables us to omit self when accessing a method or property within certain escaping closures.

 

SwiftUI extensions using generic type constraints

Creating specialized SwiftUI convenience APIs using generics.

 

Generating automatic placeholders for SwiftUI views

A short guide to SwiftUI’s new redacted modifier.

 

Adding SwiftUI’s ViewBuilder attribute to functions

How custom functions can be annotated with @ViewBuilder to enable us to make full use of SwiftUI’s DSL within such functions.

 

😊 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 update your preferences or unsubscribe from this list.

Email Marketing Powered by Mailchimp

Older messages

Swift by Sundell Newsletter #23

Wednesday, July 1, 2020

Your summary of everything new on Swift by Sundell - all articles, podcast episodes and tips published during June 2020. View this email in your browser Issue #23 - July 2020 👋 Hi everyone Wow, what a

Swift by Sundell Newsletter #22

Monday, June 1, 2020

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

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

Quick question

Sunday, April 28, 2024

I want to learn how I can better serve you ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Kotlin Weekly #404 (NOT FOUND)

Sunday, April 28, 2024

ISSUE #404 28st of April 2024 Announcements Kotlin Multiplatform State of the Art Survey 2024 Help to shape and understand the Kotlin Multiplatform Ecosystem! It takes 4 minutes to fill this survey.

📲 Why Is It Called Bluetooth? — Check Out This AI Text to Song Generator

Sunday, April 28, 2024

Also: What to Know About Emulating Games on iPhone, and More! How-To Geek Logo April 28, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your

Daily Coding Problem: Problem #1425 [Easy]

Sunday, April 28, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Microsoft. Suppose an arithmetic expression is given as a binary tree. Each leaf is an

PD#571 Software Design Principles I Learned the Hard Way

Sunday, April 28, 2024

If there's two sources of truth, one is probably wrong. And yes, please repeat yourself. ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

When Procrastination is Productive & Ghost integrating with ActivityPub

Sunday, April 28, 2024

Automattic, Texts, and Beeper join forces to build world's best inbox, Reflect launches its iOS app, how to start small rituals, and a lot more in this week's issue of Creativerly. Creativerly

C#503 Building pipelines with System.Threading.Channels

Sunday, April 28, 2024

Concurrent programming challenges can be effectively addressed using channels ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

RD#453 Get your codebase ready for React 19

Sunday, April 28, 2024

Is your app ready for what's coming up in React 19's release ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

☁️ Azure Weekly #464 - 28th April 2024

Sunday, April 28, 2024

Azure Weekly Newsletter Issue #464 powered by endjin Welcome to issue 464 of the Azure Weekly Newsletter. In AI we have a good mix of high-level and deep-dive technical articles. Next-Gen Customer

Tesla profits tumble, Fisker flatlines, and California cities battle for control of AVs

Sunday, April 28, 2024

Plus, an up-close look at the all-electric Mercedes G-Wagen and more View this email online in your browser By Kirsten Korosec Sunday, April 28, 2024 Welcome back to TechCrunch Mobility — your central