UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SOLVED: API to detect focus mode? (Personal, Work, Sleep, etc)

Forums > SwiftUI

Hello everyone

I'm currently going through 100 days of swift (day 10/100)

I want to build an app that takes full advantage of widgets and native API's (for my previous app I was using React Native, hence the switch)

And I need to detect the current focus mode value (work, sleep, focus, personal, etc) and when it changes

Is this something that can be done as far as you know?

Any resources are much appreciated!


Consider starting here?

See-> Getting into Focus


Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.