This content originally appeared on Level Up Coding - Medium and was authored by Bez Hermoso

I put together a substitute to the built-in “Driving” Focus mode in iOS. Here is how & why.
With iOS 15, Apple introduced Focus: what used to be “Do Not Disturb” that you toggle on & off has been transformed into something more flexible & expansive.
In case you are not familiar, this feature provides the user to define Focus modes. You can create & configure a mode that, when activated, only a few select contacts & apps can get through to you. Everyone and everything else gets piled into a back-log that you won’t see until you turn it off. It also allows you to specify which of your many Home Screens are shown or hidden while in that mode. It aims to help you manage how your devices demand your attention.
Apple had the incredibly sense of also rolling the pre-existing Driving mode into this system: a special Focus mode called “Driving” comes pre-configured to block all people & apps from popping up and steal your precious attention while you are behind the wheel, as well as send automated replies, and all the things Driving mode was capable of doing pre-iOS 15. This mode is configured to automatically activate every time you connect to CarPlay (I don’t remember if this is a behavior that iPhones come in by default…)
But unlike other Focus modes, “Driving” mode does not allow you to configure which of your home screen pages to show. I was disappointed to find this out: I was looking forward to setting a page on my Home Screen that is tailored for when I’m behind the wheel, and I’d like it to activate automatically as soon as I get ready to drive.
It would look like something like this:

The top two widgets are Shortcuts I most commonly use when I’m in my driveway: the first one offers me to either arm or disarm our home alarm system. The second one tells Pocket Casts to resume pick up where I left of on my podcast queue (for some odd reason, the app is unable to resume playback through CarPlay’s UI until I get the ball rolling on the iPhone first…)
- An Apple Maps widget on the middle row. This mainly acts as a launcher, but sometimes it offers the right destination which is always neat.
- A grid of audio apps, and a grid of navigation apps & Shortcuts.
- A Find My widget that shows me whether or not I left my wallet behind.
Most importantly, the things that I use most often are widgets that are actually larger than app icons: easily glanceable, requiring less precision to activate & harder to miss. When driving, wouldn’t you prefer these? I find it truly unfortunate that switching Home Screen pages is not an option to make this possible with the default Driving Focus.
“Driving+” Focus mode
To fill this gap, I set forth to create a custom Focus mode as a substitute to the built-in one. I was skeptical from the very start that I’d be able to craft something comparable, but in the end I am very pleased with the result. I called the Focus mode “Driving+”. Reproducing what the built-in Focus mode does into this custom one wasn’t actually as hard as I thought it would be: there just wasn’t really much to replicate!
There is one thing that required further tinkering around iOS:
Activate automatically when connecting to CarPlay
This was a piece of cake: I created a personal automation in Shortcuts to activate this Focus mode when I connect to CarPlay, and it works without fail:

I made sure to turn off the equivalent option from the built-in “Driving” focus mode this is replacing: Go to Settings > Focus > Driving > Turn on Automatically… > While Driving and set it to “Manually”, then toggle off “Activate with CarPlay” in the same Settings screen.
Auto-Reply
This is the only thing that I found impossible to replicate. As far as I can tell, there is no way to build this functionality — it appears Apple endowed the built-in Driving mode exclusivity to this option. However this isn’t a deal-breaker for me: the advantage of having my driving-optimized Home Screen page automatically activate whenever I need it is certainly worth the price of not having this one, a trade-off I can live with.
Closing
One thing I’ve grown to appreciate about iOS is that even though the permitted level of customizability pales in comparison to what Android offers in terms of personalization & cosmetics, the few avenues that Apple opened up for wider end-user customization — specifically w/ Focus Modes & Shortcuts––definitely feels a lot more functional and genuinely, tremendously useful to the point I do not miss Android’s customization space at all. In fact, I am pumped to be here.
Build Your Own “Driving” Mode in iOS was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.
This content originally appeared on Level Up Coding - Medium and was authored by Bez Hermoso

Bez Hermoso | Sciencx (2022-01-10T12:41:19+00:00) Build Your Own “Driving” Mode in iOS. Retrieved from https://www.scien.cx/2022/01/10/build-your-own-driving-mode-in-ios/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.