Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dranakin

macrumors 6502
Original poster
Mar 6, 2005
457
55
Essentially, I want my phone to be on silent mode while at work (based on a location geofence) and then on ringer mode whenever I’m not at work. Any idea on how to create something like this? The shortcuts app is confusing.
 
Essentially, I want my phone to be on silent mode while at work (based on a location geofence) and then on ringer mode whenever I’m not at work. Any idea on how to create something like this? The shortcuts app is confusing.
In Shortcuts app, go to automations tab, add two personal automations, each for arriving and leaving your work.

Add the silent mode action for each automation and have them set to on/off
 
In Shortcuts app, go to automations tab, add two personal automations, each for arriving and leaving your work.

Add the silent mode action for each automation and have them set to on/off
Oh got it, thank you! I was trying to do it under shortcuts and didn’t even see the automation or gallery tabs!
 
Can someone please show me how to create a shortcut that can toggle Silent Mode on / off? On my previous phones I'd have "Mute" as one of the buttons in the AssistiveTouch Top Level Menu. "Mute" is no longer one of the items you can select, but Shortcuts can be.

Thanks in advance.
 
I'm still on iOS/iPadOS 16 but I assume the following 'workaround' still works - otherwise I will correct my post.

EDIT: The attached Shortcut does not take into account that:
- iOS 17 introduces the separate parameters "Media volume" and "Ringtone volume" instead of just "volume". Updated version in post#10.
- "Silent Mode" can now be toggled in Shortcuts (at least on iPhone 15 accord. to post#11). This should be the proper way instead of adjusting the "Ringtone volume".
- When you put an iPhone 15 Pro on silent, a silent bell icon permanently appears in the status bar next to the time. So setting up a Focus with the only intend to get a status bar icon, is not necessary in this case.

If you want a visual feedback of the device being muted, I'd recommend creating an empty Focus (if possible) and toggling that. This way you get an icon in the menu bar to remind you of the 'silent mode'.

- Then use activating/deactivating that Focus to trigger the attached Shortcut.
Depending if the Focus gets activated or deactivated, the Shortcut mutes or restores the system volume.
Shortcuts > Automation > Personal Automation > Trigger: 'Your Focus' > When Turning On and Off > Run Shortcut

- Or: If you want to run the Shortcut directly, the mentioned Automation part is not necessary.
But in the Shortcut you'd have to add activating/deactivation the Focus to use the current If-condition and to still get the icon.
 

Attachments

  • Mute-Toggle.png
    Mute-Toggle.png
    237 KB · Views: 710
Last edited:
  • Like
Reactions: Synomenon
I couldn't re-create that. In the first "If", I couldn't get "Text" to follow after that "Current Focus" "is"
 
In the If-condition, tap on "Current Focus" then on "Type" to select "Text".
 
  • Like
Reactions: Synomenon
Ok, I created the shortcut. I added two things though:

Set volume is now "Set Media volume" and "Set Ringtone volume"... in both places you have Set volume.

Toggle Silent Mode.jpeg





Also, do I have to create an empty / blank focus called "Mute-Focus"?

I tried the shortcut and it does mute everything (media and ringtone), but pressing it again does not undo it.
 
Great. And my bad I wasn't aware in iOS 17 you now have "Ringtone" and "Media" volume available.
Also, do I have to create an empty / blank focus called "Mute-Focus"?
Yes. But as mentioned, I only recommended the Focus part so you get an additional status icon as visual feedback in the 'menu bar'.
When you create the Focus, make sure you allow all apps/contacts.
If you do not want the Focus part at all, I will modify the script accordingly and upload a screenshot in my first post. I would make use of the "Media volume" and "Ringtone volume" value and assume 'Mute' is 'ON' if both volumes are '0%'.
I tried the shortcut and it does mute everything (media and ringtone), but pressing it again does not undo it.
As expected if you did include the 'Focus If-condition'. Only if it detects that the "Mute-Focus" is currently active, will it then 'un-mute' the device if you run the Shortcut.
 
Last edited:
Yes, it would be good to have a visual feedback of the Mute status.

If it's activated by a Focus though, can I still use it with the Action Button? If not, then I'll skip the Focus.
 
Just so I understand correctly, are you talking about the new Action Button of the iPhone 15?
If so, what advantage does the Shortcut have in comparison to simply assigning the Mute/Silent function to the button? Or use the default long-press?
And yes, the new Action Button can activate a specific Focus.
 
  • Like
Reactions: Synomenon
I guess assigning the focus vs. the shortcut itself to the action button doesn't make a difference. The default long press only silences the ringer though. It doesn't mute media.

When I mute, I like having both muted.
 
When I mute, I like having both muted.
Makes sense.
The following Shortcut:
- assumes you have created a Focus ("Mute-Focus") without any restrictions
- does not rely on any Automation but can be executed directly (via Action Button)
To not overcomplicate things, I set the ringtone volume as Number in the following Shortcut.
If you want the ringtone volume dynamically read and stored, you have to create a second .txt file or adapt the script to read several lines of the same file.
 

Attachments

  • Shortcut-Mute-Ringtone+Media.png
    Shortcut-Mute-Ringtone+Media.png
    197.2 KB · Views: 460
  • Like
Reactions: Synomenon
Awesome. Almost there. So now along with ringtone volume and media volume being toggled, it also needs to toggle Silent Mode on / off.

What you have above toggles ringtone and media, but things like locking the screen, etc. still play their sound until Silent Mode is turned on.



Edit:
Ok I figured out the Silent Mode toggle. I just added "Turn Silent Mode On" below Set Media / Ringtone volume to 0% and "Turn Silent Mode Off" below Set Media / Ringtone volume to Number.
 
Last edited:
  • Like
Reactions: NoBoMac and arw
Glad you got it working!
But that's what I meant in my first post with me still being on iOS 16 - I made you go through some unnecessary steps as new functions are now available.
Setting the "ringtone volume" should be obsolete with "Turn Silent Mode On/Off" available.

I will purge my posts accordingly.
 
  • Like
Reactions: Synomenon
I will purge my posts accordingly.

Just leave it, because...

Edit:
Ok I figured out the Silent Mode toggle. I just added "Turn Silent Mode On" below Set Media / Ringtone volume to 0% and "Turn Silent Mode Off" below Set Media / Ringtone volume to Number.

If someone stumbles onto this thread down the road, it might all be of use because "Turn Silent Mode" is iPhone 15 and future. Older devices don't have it so need to do the Media and Ringtone versions of this (new parameter with iOS 17; thread caught my eye and added/changed my Shortcuts accordingly for my 13).
 
Oh, another thing I only noticed now in post#5 unique to the iPhone 15 Pros:
When put on silent, a crossed bell icon already gets displayed permanently in the status bar next to the time.
So if the only intent of setting up a 'Focus' is to get a status bar icon, it is not necessary in this case.

Of course the 'If-condition' to determine the current status has to be modified. Either by getting the current volume(s) or perhaps the iPhone 15 (Pro) offers a new Shortcuts parameter "Get current Silent Mode status".

(Side note: To disable the bell icon: Settings app > Sounds & Haptics > Silent Mode: Show in Status Bar > Off)
 
Last edited:
Oh, another thing I only noticed now in post#5 apparently unique to the iPhone 15 (Pro ?):
When put on silent, a crossed bell icon already gets displayed permanently in the status bar next to the time.
So if the only intent of setting up a 'Focus' is to get a status bar icon, it is not necessary in this case.

Of course the 'If-condition' to determine the current status has to be modified. Either by getting the current volume(s) or perhaps the iPhone 15 offers a new Shortcuts parameter "Get current Silent Mode status".

(Side note: To disable the bell icon: Settings app > Sounds & Haptics > Silent Mode: Show in Status Bar > Off)
Wow. I don't know how I did not notice the bell icon. So what modifications are needed then in this script to remove reliance on the blank focus?

I don't see a Get Current Silent Mode Status shortcut parameter.
 
Last edited:
As tested by @Synomenon - a Shortcut to toggle the native 'Silent Mode' but extended to also mute/restore "Media volume" accordingly.
Requires iOS 17 for "Media volume" and an iPhone 15 Pro for "Turn Silent Mode On/Off".
(zipped png for full resolution)
 

Attachments

  • Toggle-Silent.png
    Toggle-Silent.png
    141.7 KB · Views: 248
  • Toggle-Silent.png.zip
    631.3 KB · Views: 140
Last edited:
  • Like
Reactions: Synomenon
I tried to create such automation and I have error as shown on the picture below. Any ideas ? Or I broke iOS again 🤣 I'm on iOS 17.0.2...
 

Attachments

  • IMG_7248.png
    IMG_7248.png
    233.1 KB · Views: 170
There’s a dedicated action in automation but of course nothing can be simple with Apple…
 

Attachments

  • IMG_7248.png
    IMG_7248.png
    233.1 KB · Views: 110
  • Like
Reactions: Synomenon
Essentially, I want my phone to be on silent mode while at work (based on a location geofence) and then on ringer mode whenever I’m not at work. Any idea on how to create something like this? The shortcuts app is confusing.
You don't even need a shortcut for this, just add the focus filter for "silent mode" to your work focus, and make sure you have a "smart activation" for it based on your work location. I have my work focus set up this way.
 
So I normally have the "Change with Buttons" turned on in Settings -> Sounds & Haptics. I like having the ringer and media volumes separate.

This Shortcut @arw so kindly made will make sure everything is muted / set to 0. It can then be assigned to the Action Button and also set as one of the top-level buttons in AssistiveTouch ("Mute" was one of the available buttons until iOS 17).
 
Moderator Note:

Merged a couple of threads as same question/problem.
 
Here's the Shortcut I'm using now. It's @arw's with the added "Turn Silent Mode On" and "Turn Silent Mode Off" below their placeholders.
 

Attachments

  • IMG_13.jpeg
    IMG_13.jpeg
    60.9 KB · Views: 309
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.