the below code works fine on android and the sound is played....however on ios simulator it does not.
Ive added my sound file to Xcode project, and no error is caught.....when I step through code, it runs this.sound.play()
successfully and callback function is called...however you dont hear any sound.
import Sound from 'react-native-sound';
sound = new Sound('sound.mp3');
try {
this.sound.setCategory('Playback');
this.sound.play(() => {
this.sound.stop();
this.sound.release();
});
} catch (e) {
console.log('cannot play the sound file', e);
}
If you have the newest Xcode 11.6, did you try messing around with the settings in
Simulator > I/O > Audio Output
(if it's an older xcode, maybe
Simulator > Hardware > Audio Output
)?