Skip to content

fix(plugin): always add the audio background mode, drop backgroundAudio - #31

Merged
mfazekas merged 1 commit into
mainfrom
remove-background-audio-option
Oct 28, 2026
Merged

mfazekas merged 1 commit into
mainfrom
remove-background-audio-option

Conversation

@mfazekas

Copy link
Copy Markdown
Contributor

The backgroundAudio: false option from #19 leaves audio out of UIBackgroundModes, but Navigation SDK 3.33.0 asserts on it (RouteVoiceController.verifyBackgroundAudio(), RouteVoiceController.swift:114) the first time the voice controller is read: on headless startActiveGuidance, on <NavigationView>, and on setVoiceMuted.

A simulator matrix (iPhone 17, iOS 26.5) over Debug/Release × with/without audio, for headless guidance, <NavigationView> and both after setVoiceMuted(true): Debug without audio crashed (EXC_BREAKPOINT) in every case, at guidance start or at the mute call, even with voice muted. Debug with audio and all Release builds guided normally.

The plugin now always adds audio (once). An app that still passes backgroundAudio gets a prebuild warning and the option is ignored. The README no longer suggests declaring it only for spoken guidance, and the bare setup says it's needed for any guidance start.

The Navigation SDK asserts in debug builds without audio in UIBackgroundModes when guidance starts or the voice is muted, so the opt-out only produced crashing debug builds. backgroundAudio is now ignored with a prebuild warning.
@mfazekas
mfazekas marked this pull request as ready for review October 28, 2026 20:50
@mfazekas
mfazekas merged commit 58b8d26 into main Oct 28, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant