Not possible/Seek alternatives
Screen Time for iOS
I’m not sure if Apple has announced an API for the newly announced ScreenTime features, but it’d be nice to see how using my iPhone/iPad correlates with other metrics.
Not possible due to no API.
I’m not sure if Apple has announced an API for the newly announced ScreenTime features, but it’d be nice to see how using my iPhone/iPad correlates with other metrics.
Not possible due to no API.
We probably won’t be looking into replicating what Moment does, as there’s a significant amount of work there for what would be a fairly small part of Exist overall. But you might like to vote for this suggestion for manual tracking, which would allow manual entry for phone screen time.
RescueTime tracks mobile time for iOS, and while it drains the battery faster and requires continual location access, there is a way to access it from their API, according to their support:
“Try adding restrict_source_type=mobile to your API queries. (the possible values are ‘computers’, ‘mobile’, and ‘offline’)”
Update: Screentime for iPhone does work.
```python def get_mobile_minutes(date): “”“given the date as a formatted string, returns mobile minutes as an int”“” headers = {‘key’: api_token}
data = requests.get('https://www.rescuetime.com/anapi/data?key='+api_token+'&restrict_source_type=mobile&format=json&restrict_begin='+date+'&restrict_end='+date).text
minutes_spent_on_date = json.loads(data)['rows'][0][1]//60
return minutes_spent_on_date```
This will return the number of mobile minutes for a given date
Let me try making the code look better:
def get_mobile_minutes(date):
“”“given the date as a formatted string, returns mobile minutes as an int”“”
headers = {‘key’: api_token}
data = requests.get('https://www.rescuetime.com/anapi/data?key='+api_token+'&restrict_source_type=mobile&format=json&restrict_begin='+date+'&restrict_end='+date).text
minutes_spent_on_date = json.loads(data)['rows'][0][1]//60
return minutes_spent_on_date
Is this still the case? I came across an app called Clearspace which seems to access the Screen Time API on iOS.
If this app can do it, would it be possible for Exist to do it too?
There’s a bit more info here: https://news.ycombinator.com/item?id=44194120
As far as I can tell, there’s still no official way to access a user’s Screen Time data in the way we’d need to for Exist. My best guess about Clearspace is that they’re using a workaround to approximate Screen Time usage because Apple doesn’t actually allow access to this data. This kind of approach has a lot of downsides and isn’t a good fit for Exist, so we’ll have to wait until it’s possible (if ever) to access the real data directly.