Understanding the "some" Keyword in Swift and SwiftUI
Learn what the "some" keyword means in Swift, how opaque return types work, and why SwiftUI uses "some View" everywhere.
// 20 articles available
Learn what the "some" keyword means in Swift, how opaque return types work, and why SwiftUI uses "some View" everywhere.
Swift offers actors, GCD, and locks for thread safety. Each solves the same problem differently. Here's how to choose.
Actors provide compile-time safety for shared mutable state in Swift. Here's when to use them and how they compare to older approaches.
Grand Central Dispatch remains a practical choice for thread safety in Swift, especially when you need synchronous access or are working with legacy code.
Locks offer the lowest overhead for thread synchronization in Swift. Here's when that matters and how to use them safely.
A practical introduction to async/await in Swift, covering the fundamentals you need to write concurrent code that's both safe and readable.
Both async/await and Grand Central Dispatch solve concurrency problems, but they approach them differently. Here's how to choose between them.
A refactoring mishap with arithmetic expressions led me down the rabbit hole of operator precedence differences between Swift and Objective-C. Here's what to watch for.
Learn how to use AlarmKit to schedule alarms that appear in the system Clock app, giving your app native alarm integration on iOS 26.
Learn how to use AppStore.ageRatingCode to read your app's current age rating and react to rating changes for parental consent compliance.
Failable initializers offer a cleaner alternative to if-let statements when your SwiftUI views depend on optional data.
How to traverse the view controller hierarchy to find the currently visible view controller.
How to generate random emoji characters in Swift using Unicode scalar ranges.
How to check available and total disk space on iOS devices using URL resource values.
Learn how to access and configure environment variables in Swift applications for configuration management, API keys, and feature toggles.
Learn how to use kCFStringTransformToUnicodeName to get the system name for any emoji.
Learn how to prevent typing with your physical keyboard from dismissing the software keyboard when running your Swift app in the iOS simulator.
A practical guide to the different methods for adding single elements, multiple elements, and inserting at specific positions in Swift arrays.
Learn how to access your app's App Delegate from anywhere in your Swift code, including from SwiftUI views.
Learn multiple approaches to replace characters and substrings in Swift strings, from simple replacements to pattern-based transformations.