iOS: disable VoiceWake on Simulator

This commit is contained in:
Peter Steinberger
2025-12-13 20:52:31 +00:00
parent 01eba1b8d9
commit ceb3980b93

View File

@@ -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 Simulators audio stack is unreliable for long-running microphone capture.
// (Weve observed CoreAudio deadlocks after TCC permission prompts.)
self.isListening = false
self.statusText = "Voice Wake isnt supported on Simulator"
return
}
self.statusText = "Requesting permissions…"
let micOk = await Self.requestMicrophonePermission()