maxoliinyk
maxoliinyk

Reputation: 29

How to detect when user turns off their Focus Mode?

I’m working on an application that relies on Focus Modes, and I need to detect when a user turns off their Focus Mode (e.g. Do Not Disturb, Work, Sleep) to revert applied configuration back to their pre-Focus settings. I’ve already implemented Focus Filters for my app, but I’m struggling to find a reliable way to detect when Focus is deactivated.

I was quite disappointed that Focus Filters and App Intents don’t automatically provide a way to tell when Focus is turned off. Moreover, I also noticed that in iOS, when you use a filter like "Turn AOD On," it doesn’t switch back to "Off" after Focus ends.

I wonder if there's a way to track Focus Mode changes for macOS applications. I’m okay with using third-party APIs since my app isn’t on the App Store. Any ideas or solutions would be helpful!

Upvotes: 0

Views: 26

Answers (0)

Related Questions