How can I make iPhone silent for a specific amount of time?
As of iOS 12, there are now built-in options for Do Not Disturb that you let you set it in a more granular or "smarter" way. If you go into Control Center and long press on the Do Not Disturb icon, you're now presented with four options:
- For 1 hour
- Until this evening
- Until I leave this location
- Until the end of this event
There are also two other modes available in Settings > Do Not Disturb:
- Do Not Disturb While Driving: this will enable Do Not Disturb either automatically (based on detected speed) or whenever you're connected to your car's Bluetooth. You can also turn this on and off manually from Control Center
- Do Not Disturb During Bedtime: this is an additional option to scheduled Do Not Disturb that will also dim the lock screen and send all incoming notifications to your history (so you can review them after DND ends)
Short of using a Siri shortcut, I don't think there's any way to set Do Not Disturb for an exact number of minutes, but the above options will probably cover most situations in which you'd want to do that.
While time-limited muting does exist on Android, it does not on iOS. You can set your phone to silent (by using the mute switch on the side of the phone), but you can't set it to silent for N hours. This feature could come in a future software update (try suggesting it to Apple) but can't come from an app, as iOS apps are forbidden from controlling ringer volume or Do Not Disturb setting.
You can, however, set DND to come on for a specific time period every night, having it automatically turn on at 10pm and turn off at 7am, say (times are customizable). That's in Settings
->Do Not Disturb
->Scheduled
.
Source of information about apps not being able to control ringer volume: my personal knowledge as a published iOS developer and this answer.
In the “correct” and most voted answer comment, you’ve suggested that an on the spot DnD timing would be preferable over the scheduled one. The screenshot I have added is from shortcuts app and does exactly that. Also if you you follow the other shortcut you can enter the time in text format till which you want dnd to be turned on. Furthermore, with some better skills, I hope one can use the time provided in the siri command just like in the other answer and its comments, it is 3 hours.