iphone sound disappearance - ios build or hardware issue?

I searched forums concerning related topics to no avail. My issue is that during iOS development, the sound from my game would sometimes play on the iphone. sometimes it won’t. during the instance where it won’t play its sound, I plug in a headset to hear it playing. I did methods such as blowing the headset jack and resetting the device yet the problem is quite persistent: it won’t play its sound via its speakers but would play once the headset is plugged. so my questions are:

  1. is this sound disappearance caused by my iOS dev build or is this a hardware issue?

  2. is there a way to for the iphone to check if its using its speakers or headset via debug code?

  3. is there a way to force the iphone to play its sound via its speakers/headset?

I’m running into similar issues. I wish there option 3 were possible:

  1. is there a way to force the iphone to play its sound via its speakers/headset?

But I’ve been digging so far and haven’t found anything…

We are also having a similar issue. The game starts and the audio works as intended (in the main menu), then we load a scene and the sound volume is so low you can barely hear it, then go back to the main menu and the sound volume is also very low. I have to kill the app and launch it again for the sound to work at the right volume level again.

Everything works great on iPad.