PlaySoundFileNamed Action in SpriteKit Scene stops playing

I am making a health Watch app that gives the user audio cues for eye exercises while an animation plays on the Watch face.

I have added PlaySoundFileNames Actions to the Scene actions window to play audio instructions for "Look up", "Look down", etc.



The sounds are .wav files.


When I deploy and run on my Apple Watch Series 3 the animation plays and the audio cues can be heard.


However, the audio cues stop playing after a while.


This seems to happen after I close the app and re-open it.

Haptic taps and audio will play every time, but the PlaySoundFileNamed audio only play once.


Has anyone else experiences this? Is there a function call to reset or initialize the PlaySoundFileNames action when the watch wakes up or the app is launched again?


Here is an image of my Scene in XCode:

https://www.dropbox.com/s/3yichiiiomyfdmz/WatchKit_PlaySoundFileNamedAction.png?dl=0


Cheers,

John

Replies

Once the watch black out and come back, PlaySoundFileNamed will stop working.


The only reliable way is to use AVAudioPlayer to play sound.