Swift’s Codable protocol and its surrounding APIs provide a built-in way to serialize and deserialize Swift values to and and from various formats, including JSON and Plists. Arguably one of the most appealing aspects of Codable is its tight integration with the Swift compiler, which often makes it possible for the compiler to automatically generate […]
Like many developers, I use open source tools on daily basis. Recently, I’ve got the chance to create one for other teammates and try to think about what I should consider before launching it. Today I share this checklist. License Before sharing anything, it’s quite important to know what would be the license for your […]
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 […]
A big part of the developer journey is make sure our code behaves as expected. It’s best practice to setup tests that allow us to test quickly and often that nothing is broken. If unit testing is common practice to check the business logic, we can also extend it to cover some specific UI behaviors. […]