iOS: disable VoiceWake on Simulator

main
Peter Steinberger 2025-12-13 20:52:31 +00:00
parent 01eba1b8d9
commit ceb3980b93
1 changed files with 10 additions and 0 deletions

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()