
iPhone does not include a simple “Do Not Disturb while charging” switch, but Shortcuts can create the behavior. A personal automation can turn a Focus on when charging starts and another automation can turn it off when charging stops.
This requires iOS 15 or later and the built-in Shortcuts app.
Does This Affect You?
Use this if you want the phone to go quiet automatically when plugged in overnight without manually toggling Do Not Disturb every night.
Turn Do Not Disturb On When Charging Starts
- Open Shortcuts and tap Automation.
- Tap the plus button and create a new personal automation.
- Choose Charger.
- Select Is Connected and continue.
- Add the Set Focus action.
- Set it to turn Do Not Disturb on.
- Turn off Ask Before Running if you want it automatic, confirm, and tap Done.
Turn Do Not Disturb Off When Unplugged
- Create another Charger personal automation.
- Choose Is Disconnected.
- Add Set Focus.
- Set Do Not Disturb to turn off.
- Disable Ask Before Running if desired and save.
Automation Tips
Use Another Focus
If Do Not Disturb is too strict, use Sleep or a custom Focus with allowed contacts and apps.
Limit It to Night
Add time conditions or build the automation so it only runs overnight if you do not want it triggered by daytime top-ups.
Check Both Automations
Make sure one automation turns the Focus on and a second one turns it off. Otherwise it may stay enabled after unplugging.
Background Reliability
Shortcuts needs permission to run automations. Low Power Mode or restrictions can occasionally delay automation behavior.
Sources
- Apple Support: Setting triggers in Shortcuts on iPhone or iPad
- Apple Support: Enable or disable a personal automation in Shortcuts
- Apple Support: Use Focus on iPhone
