No Audio

Hi All,

I've read the other comments but haven't figured this out. Is it possible to play audio to the watch speaker as of beta 1? I can get the mp3 file to tell me I need an external bluetooth speeker on the simulator but my watch just crashes. I just can't figure it out and it looks like others can't fix it either. Then I see a "hack" for nanoFlappy that plays all audio to the watch speaker...***? I have tried the code on other post but it just doesn't work. So if anyone has code (Swift) that actually works, I would appreciate seeing it...


Thanks.

Replies

i placed a wkinterfacemovie in storyboard and set an outlet to the interface file, this worked for me in willActivate():


let url = NSBundle.mainBundle().URLForResource("song", withExtension: "mp3")

myMoviePlayer.setMovieURL(url!)

Does this work without showing a movie interface?

I've followed this dev conference but I think background audio MUST use the bluetooth headset...- https://developer.apple.com/videos/wwdc/2015/?id=208

so far I've only been able to do it by showing a movie interface. The docs for watchos2 are really atrocious

Yeah this worked great for me. wished you could do it without the movie icon since it takes away from the look and feel of the app. But alas, I'll make due for right now.

Any luck in Beta 2?

Just tried, built from xcode b2, ios9 b2 watchos2 b2 and still just causing the app to hang on [player play]. The initial setup works fine.