Skip to content

Swift

31 post(s)

Blog

  • Making Swift Error Messages Human-Friendly—Together

    Making Swift Error Messages Human-Friendly—Together

    Swift error messages can be cryptic, but as a community, we can make them clearer. Help others (and your future self) by contributing better explanations.

  • Better Error Reporting in Swift Apps: Automatic Logs + Analytics

    Better Error Reporting in Swift Apps: Automatic Logs + Analytics

    Tired of vague bug reports like "it doesn't work"? In this post, you'll learn how to collect automatic logs and track real-world errors in your Swift apps—with just a few lines of code.

  • Unlocking the Real Power of Swift 6's Typed Throws with Error Chains

    Unlocking the Real Power of Swift 6's Typed Throws with Error Chains

    Discover how to turn Typed Throws from a headache into a superpower — with clean error handling and powerful debugging insights.

  • Swift Error Handling Done Right: Overcoming the Objective-C Error Legacy

    Swift Error Handling Done Right: Overcoming the Objective-C Error Legacy

    Tired of cryptic Swift error messages like '(YourError error 0)'? Here's how to fix them for good—with clarity and elegance.

  • Solving Swift Macro Trust Issues in Xcode Cloud Builds

    Solving Swift Macro Trust Issues in Xcode Cloud Builds

    Swift macros are powerful but can break your CI pipeline with trust errors. Learn how to implement a simple post-clone script that solves the "Target must be enabled" error in Xcode Cloud once and for all.

  • Swift Localization in 2025: Best Practices You Couldn't Use Before

    Swift Localization in 2025: Best Practices You Couldn't Use Before

    String Catalogs improved localization but introduced new challenges. This article explores how to regain structure and efficiency with modern best practices and a new open-source tool that could change the way you localize.

  • Test your Swift Packages Linux Compatibility on Mac

    Test your Swift Packages Linux Compatibility on Mac

    Ever wondered how to test your Swift code's compatibility with Linux from your Mac without diving into Docker? In this article, I'll share a simple command that makes the process effortless!

  • Introducing HandySwift 4.0

    Introducing HandySwift 4.0

    Investing time in Open Source again: Complete revamp of HandySwift with vastly improved documentation and lots of added handy features extracted from my apps. Read on to learn which helpers I use most often!

  • The Missing String Catalogs FAQ for Localization in Xcode 15

    The Missing String Catalogs FAQ for Localization in Xcode 15

    Discover the game-changing implications of Apple's new feature, String Catalogs, which replaces traditional localization files and streamlines the localization process. From automatic key extraction to safety checks, find out why developers should be excited about this powerful tool in Xcode 15.

  • Window Management with SwiftUI 4

    Window Management with SwiftUI 4

    Learnings from modernizing the window handling of my Mac app after upgrading to SwiftUI 4. Explaining `\.openWindow`, `.windowResizability` & more.

  • Preparing My App for Swift 6

    Preparing My App for Swift 6

    How to enable Swift 6 mode for your Xcode projects and for your SwiftPM modules today. And what the migration experience is like.

  • Migrating to The Composable Architecture (TCA) 1.0

    Migrating to The Composable Architecture (TCA) 1.0

    Sharing my learnings and my code structure after migrating my app to the vastly modernized APIs of TCA 1.0.

  • 2,000 Imports: Organizing my Apps' SwiftPM modules

    2,000 Imports: Organizing my Apps' SwiftPM modules

    How to organize your apps Swift modules for clarity & convenience using a hidden (unofficial) Swift feature. A practical solution for small to medium-sized apps.

  • My Top 3 Wishes for WWDC 2022

    My Top 3 Wishes for WWDC 2022

    With Apple announcing WWDC week for June 6–10 this year, let’s dive into what new frameworks, APIs, and tools I hope to see unveiled and what using them might feel like with examples.

  • Multi Selector in SwiftUI

    Multi Selector in SwiftUI

    Adding a missing SwiftUI component for prototyping purposes.

  • Hiding Secrets From Git in SwiftPM

    Hiding Secrets From Git in SwiftPM

    A step-by-step guide on how to prevent your 3rd party service secrets from committing to Git when using apps modularized with SwiftPM.

Snippets

  • Vapor's maximumActiveConnections Is Per Event Loop, Not Per Worker

    A non-obvious Vapor configuration detail that can cause intermittent 500 errors when your actual connection count exceeds what you think you configured.

  • Use .labelStyle(.iconOnly) Instead of Nesting Image in Button

    The proper SwiftUI pattern for icon-only buttons that preserves accessibility without sacrificing readability.

  • EditorConfig for Every SwiftPM Package

    Why every Swift package should include an .editorconfig file to enforce consistent indentation across all contributors.

  • Videos and Tabs in DocC Documentation

    Two lesser-known DocC features that make your documentation more interactive: embedded videos and tabbed content navigation.

  • Convert Paid Apps to Freemium Without Affecting Existing Users

    How to use StoreKit's AppTransaction API to transition from paid-up-front to freemium while preserving access for users who already paid.

  • Building an AsyncButton in SwiftUI

    A reusable button component that handles async actions with automatic loading state, disabling, and success/failure indication.

  • ImageRenderer Cannot Export UIKit-Backed Views

    SwiftUI's ImageRenderer silently fails on views that use UIKit or AppKit under the hood, like List and ScrollView.

  • Combine Swift Imports with a Wrapper Module

    Create a single import that re-exports all your commonly used frameworks using @_exported import.

  • SwiftUI Navigation: Present Data, Not Views

    Understanding the mental model shift from imperative navigation in UIKit to data-driven navigation in SwiftUI.

  • AsyncImage Does Not Support .resizable()

    SwiftUI's AsyncImage does not allow the .resizable() modifier, requiring a phase-based workaround.

  • Xcode 15 Brings Type-Safe Asset Catalog Access

    Xcode 15 generates type-safe Swift accessors for images and colors in asset catalogs, replacing the need for SwiftGen.

  • Previewing Loading States in SwiftUI Without Changing Production Code

    A preview-only helper that simulates network delays so you can see loading states in SwiftUI previews.

  • Xcode Code Snippets for Developer Warnings

    Using Xcode code snippets with #warning to leave actionable reminders in your codebase.

  • Quick Access to Swift Evolution Proposal Summaries on GitHub

    A simple URL trick to read summarized versions of Swift Evolution proposals on GitHub.

  • Pulsating Button Animation in SwiftUI

    How to create a pulsating button effect in SwiftUI to guide users during onboarding.