iOS technique to make device silent at specific time by user's permission.
iOS does not have APIs for this. The Ring/Silent switch, Night Shift and so on are implemented by the OS based on input from the user.
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
This app does:
Any ideas on how they pulled it off?
Also, how would one programmatically change the silent/mute switch in an app for private use?
No idea. But that app (if it actually does what it claims to do) violates a number of review guidelines and there is absolutely no guarantee you'd get past review if you managed to accomplish something similar. The cardinal rule is: thou shalt not affect the operation of other apps. Such as their ability to play sounds.
Discussion of private APIs is not allowed on this forum.
I've seen similar apps in the past simply replace the chosen ringer sound with a silent segment, instead. The actual ringer still functions, but without making an audible noise, the resulting effect makes it seem like it has been turned off.
As noted, there is no simple, authorized lever the dev can pull to step on an otherwise default Apple provided device function such as this.