One of the major advantages of Swift’s built-in Codable API is how the compiler is able to automatically synthesize many different encoding and decoding implementations when using it. In many cases, all that we have to do to enable a Swift type to be serialized into formats like JSON is to mark it as Codable, […]
My thanks to the team behind the clipboard management app Paste for sponsoring Swift by Sundell last week, and for helping me continue to keep the site completely free to access for everyone. Paste is like a time machine for your clipboard. It stores every link, image, file, and piece of code that you copy […]
New in Swift 5.5: It’s now possible to conditionally compile postfix member expressions using Swift’s #if compiler directive. Let’s take a look at what kinds of situations that this new feature could be really useful in. Although many of the built-in APIs and frameworks work exactly the same way across Apple’s platforms, there are certain […]
Roxana Jula joins John to discuss Apple’s various tools, frameworks, and APIs for building Augmented Reality experiences. How to get started building AR-based apps, what’s the current state of AR on Apple’s platforms, and how might that change if Apple were to introduce dedicated AR hardware in the future? Stream: Build scalable in-app chat or […]
When iterating over any Swift collection using a standard for loop, there are two key components that decide what elements that will be passed into our iteration code — a sequence, and an iterator. For example, Swift’s standard Array type is a sequence, and uses IndexingIterator as its iterator type. While we very often interact […]
Antoine van der Lee, creator of SwiftLee, joins John to discuss the new language features that are being introduced as part of Swift 5.5 — from the brand new concurrency system, to convenience features and various improvements. Stream: Build scalable in-app chat or activity feeds in record time using Stream’s open source, Swift-native SDK that’s […]
New in Swift 5.5: It’s now possible to define protocol APIs that let us use Swift’s very convenient “dot syntax” to create conforming instances, which in turn can make certain protocols act more like enums, while still retaining all of the flexibility that protocols give us. For example, when applying a style to a SwiftUI […]
For the most part, it’s fair to say that modern iOS and Mac apps are expected to gracefully adapt to whether the user’s device is running in light or dark mode, which often requires us to use more dynamic colors within the UIs that we build. While Apple does make it fairly straightforward to declare […]
When switching on an enum, we are required to either explicitly handle all of its cases, or provide a default case that’ll act as a fallback for cases that weren’t matched by any previous case statement. For example like this: struct Article { enum State { case draft case published case removed } var state: […]
Jordan Morgan returns to the show to discuss some of the key new APIs and frameworks that were announced at WWDC21, and how they can be integrated into the apps that we build, now that about two months have passed since the conference took place. Bitrise: Rock-solid continuous integration for your Swift project, which now […]