From ceb3980b93a870633eabc7f9638af60276796c38 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 13 Dec 2025 20:52:31 +0000 Subject: [PATCH] iOS: disable VoiceWake on Simulator --- apps/ios/Sources/Voice/VoiceWakeManager.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/ios/Sources/Voice/VoiceWakeManager.swift b/apps/ios/Sources/Voice/VoiceWakeManager.swift index 1a48990e7..ea42da998 100644 --- a/apps/ios/Sources/Voice/VoiceWakeManager.swift +++ b/apps/ios/Sources/Voice/VoiceWakeManager.swift @@ -108,6 +108,16 @@ final class VoiceWakeManager: NSObject, ObservableObject { guard self.isEnabled else { return } if self.isListening { return } + if ProcessInfo.processInfo.environment["SIMULATOR_DEVICE_NAME"] != nil || + ProcessInfo.processInfo.environment["SIMULATOR_UDID"] != nil + { + // The iOS Simulator’s audio stack is unreliable for long-running microphone capture. + // (We’ve observed CoreAudio deadlocks after TCC permission prompts.) + self.isListening = false + self.statusText = "Voice Wake isn’t supported on Simulator" + return + } + self.statusText = "Requesting permissions…" let micOk = await Self.requestMicrophonePermission()