Files
notes/Notes/AppDelegate.swift
T
rzen 86d74806c9 Add voice notes: on-device transcription, multi-language, watch capture
- Schema v2: Note.AudioInfo, .m4a sidecar next to the note JSON in iCloud
- AudioRecorderService (iOS/macOS) + SpeechAnalyzer transcription pipeline
  with enabled-language set and confidence-based auto-pick, re-transcribe menu
- Settings > Transcription > Languages with asset download/reserve handling
- watchOS app + accessory complication: one-button recorder, WCSession
  transferFile to phone, WatchInbox staging, direct-upsert ingestion
- Player UI, transcription status chips, quick-capture mic in notes list
- Version 0.2, changelog + README updated
2026-07-15 13:30:43 -04:00

27 lines
1.0 KiB
Swift

#if os(iOS)
import UIKit
/// iOS application delegate. Its sole job is to stand up the WatchConnectivity
/// receiver in `didFinishLaunching` — which runs even on a background launch the
/// system makes purely to deliver a watch file transfer, unlike a SwiftUI
/// `.task` that may not run until the UI is built.
///
/// The receiver is created and its `WCSession` activated here immediately, so a
/// delivered recording is staged to the inbox even before `AppServices` exists.
/// `NotesApp` wires the receiver's `syncEngine` in once services are ready, so a
/// live delivery can drain right away; a delivery that arrives before then is
/// drained on the next foreground connect.
@MainActor
final class AppDelegate: NSObject, UIApplicationDelegate {
let watchReceiver = PhoneWatchReceiver()
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
watchReceiver.activate()
return true
}
}
#endif