12 Commits

Author SHA1 Message Date
3d42c83f75 fix speech authorization crash: decouple from SwiftData context
- Make TranscriptionService a plain Sendable class (not @Observable/@MainActor)
- Request speech authorization in ContentView.onAppear via callback (no async)
- Use @State pendingMemo + Task in View for transcription (Swift 6 safe)
- Separate saveRecording() and startTranscription() to avoid data races

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:31:59 +01:00
cc533dd8a5 fix CoreData store crash: create Application Support dir, explicit local config
The Application Support directory doesn't always exist on fresh
installs. Create it explicitly before configuring ModelContainer.
Use explicit store URL and cloudKitDatabase: .none to prevent
any CloudKit/remote notification options from being added.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:28:29 +01:00
3f723942d4 add transcription back after stop recording
Transcription runs in the View via Task after saving the memo.
Speech authorization is requested when the recording sheet opens.
Shows transcribing indicator. Record button disabled during transcription.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:26:16 +01:00
05cc93f3c3 fix dispatch_assert_queue crash: move SwiftData ops out of ViewModel
SwiftData's ModelContext has internal queue assertions that conflict
with @MainActor @Observable ViewModels. Move all context.fetch/insert
operations into the SwiftUI View body (which runs on the correct
queue). ViewModel now only handles audio recording state, View handles
persistence. Removed transcription from stop flow for now.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:23:08 +01:00
edb4b8a567 harden stopRecording with defensive error handling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:21:05 +01:00
8c4e085890 remove all iCloud/CloudKit to run purely local first
- Delete entitlements file entirely
- Remove remote-notification background mode
- Simplify ModelContainer to plain local store
- Fix bundle ID prefix to de.felixfoertsch per convention

iCloud sync can be added back once the container is set up
in the Apple Developer Portal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:18:57 +01:00
8892f658f8 disable CloudKit until container is set up in Developer Portal
Use explicit ModelConfiguration with cloudKitDatabase: .none
to prevent CloudKit from failing on store load. Can be switched
to .automatic once the iCloud container is created.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:13:05 +01:00
b442c13719 fix CloudKit compatibility: default values, optional relationship, background mode
- Add default values to all SwiftData attributes (CloudKit requirement)
- Make memos relationship optional (CloudKit requirement)
- Add allMemos computed property for safe unwrapping
- Add remote-notification background mode for CloudKit push sync

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:11:40 +01:00
c64f6627cb fix crash on stop recording
- Remove #Predicate with local variable capture (known SwiftData crash)
- Explicitly insert VoiceMemo into context before relationship assignment
- Save context before starting async transcription
- Extract audioURL before Task boundary to avoid cross-context access

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:09:44 +01:00
5b3f165f6e fix missing CFBundleIdentifier by using generated Info.plist
Move privacy usage descriptions from custom Info.plist to build
settings (INFOPLIST_KEY_*) and enable GENERATE_INFOPLIST_FILE so
Xcode generates a complete Info.plist with all required keys.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:07:00 +01:00
70aee19da0 fix swift 6 concurrency issues, clean build
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:01:21 +01:00
dca03214b0 initial VoiceDiary iOS app setup
SwiftUI + SwiftData + iCloud, Apple Speech transcription (German),
audio recording, summarization service protocol (LLM-ready),
localization scaffolding (EN/DE/ES/FR), basic tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 22:57:41 +01:00