Play sound from Apple Watch speaker

frenchie4111 picture frenchie4111 · Mar 11, 2015 · Viewed 17.4k times · Source

Is there a way to play sound out of the Apple Watch's speaker? I have been unable to find any documentation online.

Answer

Ric Santos picture Ric Santos · Aug 2, 2015

This is now possible as of watchOS 2 using WKAudioFilePlayer or WKInterfaceMovie.

NSURL *assetURL = [[NSBundle mainBundle] URLForResource:@"file" withExtension:@"wav"];

WKAudioFilePlayer example:

WKAudioFileAsset *asset = [WKAudioFileAsset assetWithURL:assetURL];
WKAudioFilePlayerItem *playerItem = [WKAudioFilePlayerItem playerItemWithAsset:asset];
WKAudioFilePlayer *audioFilePlayer = [WKAudioFilePlayer playerWithPlayerItem:playerItem];
[audioFilePlayer play];

WKInterfaceMovie example:

[self presentMediaPlayerControllerWithURL:assetURL options:nil completion:nil];