Why Naming Your SwiftData Model 'Tag' Breaks Your Build (+ Xcode 16 .gitkeep Trap)

What I Was Trying to Do I started a new document scanning app and was setting up SwiftData models using TDD. Simple Document and Tag models: @Model class Tag { var name: String var color: String @Relationship(inverse: \Document.tags) var documents: [Document] } Built fine. No issues so far. Trap #1: That’s Not Your Tag The moment I used FetchDescriptor in a test file, it blew up: let fetched = try context.fetch(FetchDescriptor<Tag>()) error: 'Tag' is ambiguous for type lookup in this context Turns out SwiftUI already has a Tag type — the one used for identifying selection items in TabView and Picker. When your test file imports both @testable import scansort and SwiftUI (via SwiftData), the compiler can’t decide which Tag you mean. ...

April 26, 2026 · 3 min · Young

Debugging SwiftUI Image Flickering: Three Bugs Stacked on Top of Each Other

The Problem I was building a music streaming app, and the album artwork kept flickering. Not just during track changes — even while playing the same song, the artwork would briefly disappear and reappear. The blurred background on the full player was especially bad. I figured it was slow image loading, so I added caching. Still flickered. Dug deeper and found three bugs stacked on top of each other. ...

April 21, 2026 · 3 min · Young

Handling Audio Interruptions in an iOS Music App with AVPlayer

The Problem I was building a Subsonic-based music streaming app. Background playback worked fine — until I noticed something odd: Play a song, send the app to the background Open YouTube and play a video (music stops — expected) Close the YouTube video Come back to the app: the pause button is showing, but no audio is playing The UI says “playing” while the actual audio is paused. Tapping the button toggles it to play, then you have to tap again. Broken UX. ...

April 21, 2026 · 2 min · Young

Why Storing Closures in SwiftUI @Observable Causes EXC_BAD_ACCESS

What I Was Trying to Do I was building an iOS music streaming app with detail views behind NavigationDestination. Each detail view had its own ViewModel, with API calls injected as closures. Something like this: @Observable final class PlaylistDetailVM { var songs: [Song] = [] var isLoading = false // API methods injected as closures private let fetchSongs: (String) async throws -> [Song] private let addToPlaylist: (String, [String]) async throws -> Void init( fetchSongs: @escaping (String) async throws -> [Song], addToPlaylist: @escaping (String, [String]) async throws -> Void ) { self.fetchSongs = fetchSongs self.addToPlaylist = addToPlaylist } } Created as @State inside NavigationDestination: ...

April 21, 2026 · 3 min · Young

LLM Debug Context MCP - Startup Idea

Problem (Pain Score: 7/10) When asking AI coding assistants for debugging help, LLMs only see static code—they can’t access actual runtime state. Real Examples: “I don’t know why this variable is null” → LLM can only guess Repeatedly copy-pasting stack traces for complex bugs LLM suggestions don’t work at runtime Limitations of logic analysis without actual variable values Frequency: Every debugging session (daily) AI coding tools like Claude Code and Cursor have become powerful, but complex bug resolution has limits without runtime context. ...

January 23, 2026 · 3 min · Young