NEW: Download Kickstart, the app that helps indie developers succeed on the App Store! >>

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!

2      

Consider starting here?

See-> Getting into Focus

3      

Hacking with Swift is sponsored by Maestro.

SPONSORED Let Claude Code, Cursor, or Codex write and run your mobile tests on a live emulator or simulator. With Maestro MCP, your agent fixes what breaks as it goes and hands you deterministic end-to-end tests in plain YAML that keep running in CI.

Learn more

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account