Posts tagged “Swift”
Articles
Json Snake Case
12/11/25
Conveniences to encode and decode JSON in snake_case without boilerplate, reusable in both the iOS client and the Vapor server.
Array to dictionary
12/03/25
Convert an Array of Identifiable elements (with optional ID of type UUID?) into a [UUID: Element] dictionary, ignoring null IDs and maintaining O(1) access.
Schedule Queues
11/26/25
Schedule the same ScheduledJob multiple times per hour with an expressive API: every N minutes, without repeating configuration or cron strings.
Async Task List
11/20/25
Implementation of a robust system for managing asynchronous task lists with database state persistence using Swift and Vapor.
Multi-Step Process
11/12/25
A Swift pattern to orchestrate multi-step processes with a repeat-while state machine, deterministic control and recovery after failures.
Concurrent Map
10/27/25
Build a concurrentMap extension on Sequence using Swift structured concurrency to run async transformations in parallel with Sendable safety and error handling.
Async Map
10/20/25
Build a sequential asyncMap extension on Sequence in Swift to transform collections with async/await while preserving order and limiting resources.
Guard and LogError
10/13/25
Build a generic Swift function that combines guard-let unwrapping, error logging, and exception throwing in a single reusable line for Vapor backends.
Schemas and Namespaces
10/06/25
Learn how to use the space property in Vapor's Fluent models to organize database tables into namespaces, and avoid a subtle optional type declaration bug.
Partial Indexes
09/29/25
Extend Vapor's SQLCreateIndexBuilder to support partial indexes with WHERE clauses on NULL columns, avoiding raw SQL while keeping type safety in Swift.