A challenge that many developers face as they maintain various code bases over time is how to neatly connect different frameworks and APIs in a way that properly adheres to the conventions of each technology involved. For example, as teams around the world are starting to adopt Swift 5.5’s async/await-powered concurrency system, we’ll likely find […]
In Swift, there are two ways to capture self as a strong reference within an escaping closure. The first is to explicitly use the self keyword whenever we’re calling a method or accessing a property on the current object within such a closure. For example, the following VideoViewController performs such a strong capture in order […]
To wrap up the 2021 season of the show, John revisits some of the key themes and topics that were discussed both on the show itself, and within the Swift community in general, throughout the year. Bitrise: Rock-solid continuous integration for your Swift project, which now offers 50% faster builds and ad-ons for things like […]
When building modern applications, it’s incredibly common to want to trigger some form of asynchronous action in response to a UI event. For example, within the following SwiftUI-based PhotoView, we’re using a Task to trigger an asynchronous onLike action whenever the user tapped that view’s button: struct PhotoView: View { var photo: Photo var onLike: […]
James Thomson returns to the show to discuss the various technologies that enable us to render custom UIs on Apple’s platforms. From rendering views using Core Graphics and Core Animation, to building completely custom 3D-based UIs using SceneKit and RealityKit. MacStadium: The leading provider of cloud solutions built on real Mac hardware. Get started at […]
Introduced in Swift 5.5, Swift’s built-in concurrency system provides a lightweight, yet highly efficient set of tools for writing concurrent code. That all starts with async/await, a pattern that’s become increasingly popular among modern programming languages, which enables us to utilize the language itself to manage long-running, asynchronous operations that are executed in the background. […]
Most often, we want our various asynchronous tasks to start as soon as possible after they’ve been created, but sometimes we might want to add a slight delay to their execution — perhaps in order to give another task time to complete first, or to add some form of “debouncing” behavior. Although there’s no direct, […]
Very often, making code easy to unit test tends to go hand-in-hand with improving that code’s separation of concerns, its state management, and its overall architecture. In general, the more well-abstracted and organized our code is, the easier it tends to be to test it in an automated fashion. However, in an effort to make […]
Tim Condon joins John to discuss how both client and server-side Swift developers could utilize the new built-in concurrency system, as well as how distributed actors and other upcoming language features might continue to make Swift even more capable on the server. Source link
When writing asynchronous code using Swift’s new built-in concurrency system, creating a Task gives us access to a new asynchronous context, in which we’re free to call async-marked APIs, and to perform work in the background. But besides enabling us to encapsulate a piece of asynchronous code, the Task type also lets us control the […]