How can I get information from iPhone widgets?

I have the 'steps' iphone widget on my mac desktop which accurately shows my current step count.
I would like to write a periodic macro that queries the step count, does some calculations (am I ahead / behind pace) and performs different actions based on the results.

My question is, does anybody know of a way to get that information? I mean, I can screenshot / OCR, but that would be disruptive while I'm working on my mac.

Any thoughts?

I installed the app, but I don't see how you'll get any data out of it without using a screenshot. I dug pretty deeply into the application's container, looking for a database of some sort that stored the data, but I didn't find anything.


I can't install an iOS widget on my Mac (running an OS that's too old) for testing, but there's a good chance the Steps widget is simply pulling the data from the built-in Apple Health app.

Interesting, yeah, that's a good idea for sure... but too bad it didn't yield anything

There is no built in health app on the mac unfortunately

And even if there were, Apple will almost assuredly make it impossible to extract any data except through vetted apps.


Oh I don't think that's true at all.

They have the all the health data on your phone, and it's available to extract using 'shortcuts' any time you want.

I don't see why they would restrict that on the mac.

That's exactly what I'm saying: Shortcuts is an app that accesses your health data through approved means. If this was all happening on the Mac, and you wanted to access the data that Shortcuts has from Health, but not using the Shortcuts app, that's what I'm saying would be impossible. That is, you won't find a Terminal command to browse the data in the Health app or the Shortcuts app. Access to the data is restricted to those approved apps.

Using Shortcuts, you could probably export the data, but that's not the same as being able to see what it's gathering in real time.

And maybe I'm wrong :slight_smile: ... but given Apple's focus on privacy, I'd find it odd if they allowed any random method to access health data gathered by another app.