Learn how to enable silent mode or vibrate-only mode on your iPhone, even if the physical Ring/Silent switch or the Action button on the side of your device is broken or unresponsive.
How to mute iPhone if the Silent switch or Action button is not working