35 Results for: "codable"
Actor isolated protocol conformances are a super useful way to ensure that certain protocol conformances are only available on a specific actor. That said, with this feature you’ll open yourself up to some brand new compiler errors that I’ll explain in this post.
Read postSwift 6.2 makes significant changes to concurrency, and because of that we have to understand a brand new mechanism to offload work to a background thread in Swift 6.2. Learn everything you need to know about @concurrent and nonisolated(unsafe). You’ll also find out why I’m pretty happy with these changes even though they require us to relearn certain concurrency concepts.
Read postWhy you should keep your git commits small and meaningful
Published on: February 19, 2025When you’re using Git for version control, you’re already doing something great for your codebase: maintaining a clear history of changes at every point in time. This helps you rewind to a stable state, track how your code has evolved, and experiment with new ideas without fully committing to them right away. However, for many […]
Read postModern logging with the OSLog framework in Swift
Published on: June 7, 2024We all know that print is the most ubiquitous and useful debugging tool in a developer’s toolbox. Sure, we have breakpoints too but what’s the fun in that? Sprinkling some prints throughout our codebase to debug a problem is way more fun! And of course when we print more than we can handle we just […]
Read postWhat are enums in Swift?
Published on: May 8, 2024Swift comes with types of objects that we can use to write type declarations. They all have their own distinct features, upsides, and downsides. In this post I’d like to zoom in on the enum type so you can get a sense of what enums are, and when they can be useful. In this post […]
Read postOn of app development’s largest downsides (in my opinion) is that it’s frustratingly hard for developers to quickly iterate on an app’s core features due to the App Review process which can take anywhere between a few hours to a few days. As a result of this process, developers either need to ship their apps […]
Read postIt’s common for developers to leverage protocols as a means to model and abstract dependencies. Usually this works perfectly well and there’s really no reason to try and pretend that there’s any issue with this approach that warrants an immediate switch to something else. However, protocols are not the only way that we can model […]
Read postWith Swift 5.9 and Xcode 15, we have the ability to leverage Macros in Swift. Macros can either be written with at @ prefix or with a # prefix, depending on where they’re being used. If you want to see some examples of Macros in Swift, you can take a look at this repository that […]
Read postOne of my favorite concurrency problems to solve is building concurrency-proof token refresh flows. Refreshing authentication tokens is something that a lot of us deal with regularly, and doing it correctly can be a pretty challenging task. Especially when you want to make sure you only issue a single token refresh request even if multiple […]
Read postIf you’ve been following along with Swift Concurrency in the past few weeks, you might have come across the term "task local values". Task local values are, like the name suggests, values that are scoped to a certain task. These values are only available within the context they’re scoped to, and they are really only […]
Read post