I am building a very simple workout app on WatchOS: One of it functions is to give audio feedback during the training. I am able to play a file when the display is on, but w
I figured out what I did wrong: For the sound to play with the screen off, it is very important to set the category to AVAudioSessionCategoryPlayback, not ambient.
So that is all I did to get it working: I changed one word in line 10 of my extensionDelegate.swift:
try audioSession.setCategory(AVAudioSessionCategoryPlayback, with: .duckOthers)