Watch: show version/build on screen, surface recording errors in UI
A tester on real hardware has no console, so a failed start looked like a dead button and there was no way to tell which build the watch had actually installed. Show the stamped version/build under the record button, display the last start error in place of the hint text, and fall back to the default audio session mode if .spokenAudio is rejected with the .record category. Claude-Session: https://claude.ai/code/session_01GKfAiKiQKLDTmbiGva4FGE
This commit is contained in:
@@ -34,6 +34,11 @@ final class WatchAppServices {
|
||||
|
||||
private let logger = Logger(subsystem: "dev.rzen.indie.Notes.watchkitapp", category: "recording")
|
||||
|
||||
/// Why the last start attempt failed, surfaced in the UI — on a real watch
|
||||
/// there's no console, so a silent failure is indistinguishable from a dead
|
||||
/// button. Cleared when a recording starts successfully.
|
||||
private(set) var lastError: String?
|
||||
|
||||
/// Request permission (once) then begin recording. A no-op if already
|
||||
/// recording or permission is refused.
|
||||
func startRecording() async {
|
||||
@@ -44,8 +49,10 @@ final class WatchAppServices {
|
||||
}
|
||||
do {
|
||||
try recorder.startRecording()
|
||||
lastError = nil
|
||||
} catch {
|
||||
logger.error("could not start recording: \(error, privacy: .public)")
|
||||
lastError = error.localizedDescription
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user