swift-ui

SwiftUI guides and advanced patterns.

SwiftUI

Learn SwiftUI by Building a Recipe Book App for iOS & macOS

A step-by-step guide to building a modern SwiftUI Recipe Book app for iOS and macOS.

  • swift-ui
  • ios
  • macos
  • tutorial
  • monkeys-picks
SwiftUI

SwiftUI Alerts: Fixing Bugs When Multiple Alerts Collide

SwiftUI silently ignored save error alerts once a second alert existed, and this post captures what we learned in the Advanced SwiftUI: Lessons From Mistakes series.

SwiftUI

SwiftUI @Published Crash: “Pointer Being Freed Was Not Allocated” Explained

During test teardown we hit a repeatable 'pointer being freed was not allocated' crash while deallocating a @MainActor ObservableObject, and this post explains why we treated it as a Swift runtime edge case instead of rewriting our architecture.

SwiftUI

SwiftUI @MainActor Initializers: Safe Default Parameters and Actor Isolation

After enabling stricter Swift concurrency checks, we started seeing main-actor isolation errors from @MainActor initializers that used default parameter values. This post explains why default parameter expressions are nonisolated and how to fix the pattern by moving defaults into the initializer body.

SwiftUI

DependencyContainer Malloc Crash in Tests – Post-Mortem

Under XCTest teardown we hit a repeatable 'pointer being freed was not allocated' malloc crash when deallocating async/Combine-heavy DependencyContainer and view models. This post explains what was happening and why we fixed it by deliberately leaking those objects in DEBUG tests only.

Subscribe to The infinite monkey theorem

We fling fresh posts—no banana peels attached—straight to your inbox.