zlacker

[return to "Show HN: I made a app that uses NFC as a physical switch to block distractions"]
1. nozzle+xd[view] [source] 2025-01-21 17:52:25
>>awasee+(OP)
Neat! Any idea if it'd be possible to make this work with macOS as well? I don't think Macs have NFC, but they do sync things like Do Not Disturb states between iOS and macOS.
◧◩
2. awasee+le[view] [source] 2025-01-21 17:56:26
>>nozzle+xd
I can look into it, I tried to find a way to trigger Focus modes on iOS a profile being active and it seems they only allow you to read the state and no write or update it
◧◩◪
3. filole+Ef[view] [source] 2025-01-21 18:03:17
>>awasee+le
I might be misreading what you are asking, but I just went into Shortcuts app and tried creating a new one, and there are both “Get Current Focus” and “Set Focus” actions.

Is this what you were looking for? “Set Focus” allows setting any focus mode (including custom ones, you can see one in my screenshot) on/off. And if you choose “on”, there is an additional conditional afterwards (until manually turned off/until time/until leaving location/until a calendar event ends).

Here is a screenshot of how it looks (https://ibb.co/R6gdRq4).

◧◩◪◨
4. awasee+Mr[view] [source] 2025-01-21 19:06:06
>>filole+Ef
Yeah I can't find a clear way to do this from Swift and APIs apple exposes. I can be very wrong though and just didn't dig hard enough
[go to top]