• What the hell are passkeys? (Runway)

    Passkeys are an alternative to passwords that allow you to sign in to any website or app that supports this technology without needing to define/remember a password. Over the last couple of years, the tech world has been witnessing many companies updating their products to add support to this new technology, including tech giants like…

    Read More

  • Software engineering book recommendations

    The following is a list of software engineering books I’ve read that I felt had a strong and lasting positive impact on my career. It’s not a list of everything I enjoyed (that would be impossible to list down), but rather a special list of resources that taught/helped me so much that I still find…

    Read More

  • Building a design system at Genius Scan

    As an app’s code base grows and evolves, it can be really tricky to maintain consistency within its UI. It’s easy for things like margins and padding, or colors and fonts, to start diverging, as different developers might use different values within each individual UI component’s implementation. At the same time, UI code can also…

    Read More

  • Swift protocols and the main actor

    In Swift, the @MainActor attribute can be used to associate a given type, function, or value with the global main actor, which essentially makes any such code operate on the enclosing app’s main thread. That’s incredibly useful for things like UI-related code, since UI updates (whether done using UIKit, SwiftUI, or another framework) most often…

    Read More

  • Swift by Sundell is back!

    I never actually decided to stop writing Swift articles. It just sort of happened. In fact, for the past two years as this website has been very much dormant, I’ve lost count of the number of times that I’ve sat down at my desk with the intent to write and publish a new article, or…

    Read More

  • Modern URL construction in Swift

    These days, most applications need to work with URLs in some form. Perhaps they’re used to make network calls, to read and write files, or to perform various kinds of database operations. In Swift, URLs are by convention (and through the design of Apple’s frameworks) represented using the dedicated URL type, rather than just using…

    Read More

  • Using Swift’s defer keyword within async and throwing contexts

    Swift’s defer keyword allows us to delay the execution of a given block of code until the current scope is exited. While that might initially not seem that useful (after all, can’t we simply write that code at the end of the scope instead?), it turns out that when writing modern Swift code, we’re quite…

    Read More

  • Tips and tricks for when using SwiftUI’s ViewBuilder

    SwiftUI’s ViewBuilder type is a key part of the library’s overall API design, in that it’s what enables multiple view expressions to be declared within a given scope (such as a body property implementation, or a closure passed to containers such as HStack or VStack) without requiring any manual grouping or wrapping at each call…

    Read More

  • Decoding Swift types that require additional data

    Swift’s Codable API — which consists of the Encodable protocol for encoding, and Decodable for decoding — offers a powerful, built-in mechanism for converting native Swift types to and from a serialized format, such as JSON. Thanks to its integration with the Swift compiler, we often don’t have to do any additional work to enable…

    Read More