Articles Projects About Subscribe
All posts
Saurabh Dave
Swift · SwiftUI · Apple Platform · Sep 14, 2026
Post

Crashes that start at “thread 0” and end with “who owns this?” are avoidable. The fix is module-first debugging: tag signals with the module, keep dSYMs aligned, and scope the debugger so you’re stepping in the right place.

  • Make modules observable: wrap Logger/OSSignposter per module, include the module in category, and add `` to log lines; gate verbose logs with a dynamic flag.
  • Fix symbolication: archive/upload matching dSYMs per build and use Xcode’s breakpoint “Module” filter instead of global regex traps.
  • Encode contracts early: add XCTest invariants for IDs, error mapping, and actor/thread expectations; keep them cheap and per-package.
  • Route incidents by module: group MetricKit crashes by top frame, tag logs with module, and map to owners for targeted alerts.
  • Steer LLDB: prefer `expr
#fileID#iOS#Swift#SwiftUI#iOSArchitecture