Screen Usage

I have been becoming a bit of a maniac about my iPhone screen time — I'm starting from an embarrassingly high number so I'm aiming for ~3h per day which for me is a non-trivial reduction (probably down from about 4h.)

It'd be cool if my iPhone usage was like twenty minutes per day, but alas, I use my iPhone a lot for work — I have over an hour of Slack usage per day on my iPhone, which is bananas. (I'm also in some social Slacks so I am sure that inflates it.)

I also use my iPhone for things like recipes, maps and watching sports whilst working (Ipswich Town vs. Southampton at the same time as Bayern vs. PSG was brutal) so it's easy to break 3h with those things.

That said, I wanted to track this more closely, so I decided to sync my daily screen time from my iPhone to my web server (hi!) which wasn't as easy as I expected since Apple is privacy mad and they do not just have a simple API you can query for it.

Apple Shortcuts

However once again, Apples bizzare-o Shortcuts application comes to the rescue. Shortcuts is seriously such an oddball product from Apple, it's so amazingly powerful, yet never spoken about, and also just kind of a huge pile of jank?

For posterity there is an Apple Shortcut "thing" called "Get App & Website Usage" which returns every App and Website that has had >=1 minute of usage in a given day.

The Shortcut

  1. Get App & Website Usage
  2. Ask LLM to summarize and calculate the total screen time by summing all times together
  3. POST this data somewhere.
  4. Et voila.

LLMs in Shortcuts

I had actually never used an LLM in Shortcuts before and was impressed to see that you can use:

  1. An on-device LLM
  2. A secure Apple LLM in the Cloud
  3. ChatGPT.

Unfortunately none of them worked very well for me — #1 was too dumb, #2 kept timing out, and #3 kept giving a server error. Weird.

Fortunately and hilariously tons of apps have Apple Shortcut integrations, including ChatGPT (the aforementioned ChatGPT in #3 was via the built in Apple Intelligence thing, which has a ChatGPT extension.)

It's actually kind of cool that you can make shortcuts and then automate them and pipe iPhone data into an LLM and then elsewhere, I think there are tons of possibilities here.

The Automation

But anyway what I did was make the shortcut above run every night at 2330. I added an obscure API endpoint that requires authentication to then receive this data.

What I do with this data

Currently it's used in the header of my site, I replaced a horizontal break with a chart. Neat! Hopefully this provides some accountability to the three readers of my blog and myself to use my phone less. Hi Justin!

I'm also going to pipe this data into my openclaw setup and have my agent berate me if I'm on my phone too much.