20

I am a data analyst and would like to look at the underlying data that is the basis for the relatively simple screen time reports. I want to be able to look at my phone usage data in more detail and beyond the 7 day report period that is usually reported.

Has anyone figured out how to access the data or create more in depth analyses?

0

3 Answers 3

4

I am looking into this for quite some time already and I believe there is no option to do so as of now.

However there are two ways I found to get around this issue:

  • Option 1 (without jailbreak): Use an App like Moment to track your phone usage and export the data via this app. My problem with this soultion is the fact that I potentially give away my data to the app's developer.
  • Option 2 (with jailbreak): I found this great resource that makes use of the data Apple collects anyways. The data still needs to be extracted via a script file and you still need to put some work in in order to process the outputs, but I think this is the safest bet. With this scripts you are able to extract a lot more than 'just' the phone usage.
4

While this isn't a full solution (yet), I just stumbled across an app (Timing) that claims it can import from the Screen Time data.

Skimming through the getting started steps, it basically seems like they're using 'share screen time data with other devices', and then reading from the local database/etc somewhere on macOS that stores it:

To set up the Screen Time importer, open the Timing integration preferences and add the Screen Time integration. You will be asked to complete three steps:

  1. Enable Screen Time in System Settings on your Mac and enable sharing Screen Time data across devices. This is required so that your mobile Screen Time data can be synced to your Mac.
  2. Enable Screen Time on your mobile devices and enable sharing Screen Time data across devices. This is required for your mobile device to record data that Timing can import.
  3. Finally, grant Timing the "Full Disk Access" permission in System Settings. This is required for Timing to read your Screen Time database.

Some further digging/research led me to this StackOverflow answer, which referred to a blog post by Sarah Edwards titled Knowledge is Power! Using the macOS/iOS knowledgeC.db Database to Determine Precise User and Application Usage, which dives into a bunch of the details about the location of the SQLite database, a number of the tables within it, and some queries for extracting data from them.

Based on that, we can see that the database containing the Screen Time data is located at:

~/Library/Application\ Support/Knowledge/knowledgeC.db

We can confirm that this is a SQLite database by using the file command:

⇒ file ~/Library/Application\ Support/Knowledge/knowledgeC.db

/Users/devalias/Library/Application Support/Knowledge/knowledgeC.db: SQLite 3.x database, last written using SQLite version 3039005, writer version 2, read version 2, file counter 18507, database pages 7624, 1st free page 106, free pages 137, cookie 0x5a, schema 4, largest root page 50, UTF-8, vacuum mode 1, version-valid-for 18507

I also collated the above, along with a few other notes/references about the Screen Time database on a GitHub gist for future reference:

3
  • 1
    Great analysis, thanks for digging into this. I've used the opportunity of closing the other three questions (which didn't have any answers besides yours so far) as a duplicate for this one.
    – nohillside
    Commented Apr 27, 2023 at 5:56
  • Sounds good, thanks :) Commented Apr 27, 2023 at 21:10
  • Please note: Due to recent changes in macOS 14 Sonoma, it is possible that iPhone and iPad usage can no longer be imported reliably. This feature is therefore not officially supported on macOS 14 Sonoma and later. ref.: timingapp.com/help/screen-time Commented Nov 21 at 12:03
-1

According to this discussion thread answered by Apple Community experts, there seems to be no official way of downloading your screen time data from iOS

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .