architecture

A collection of 7 posts

Swift

VIPER Architecture in Swift: How to Decouple iOS Modules

Decouple, separate, disengage, or dissociate (something) from something else.

  • swift
  • architecture
  • viper
SwiftUI

SwiftUI @StateObject vs @ObservedObject: The ObservedOrStateObject Pattern

How we built ObservedOrStateObject to let SwiftUI views own or observe view models without duplicating code.

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.

Architecture

Pre-generation Strategy: How We Cut Report Load Times from 3 Minutes to 20ms

How we transformed 3-minute financial report load times into 20ms responses using pre-generation, database caching, and scheduled jobs.

Subscribe to The infinite monkey theorem

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