Reading iMessage History from chat.db: Tables, Apple Dates and attributedBody
The article explains that the Messages app on macOS offers no real export, but its full history is stored in a plain SQLite database that can be queried directly. It describes the chat.db file and its WAL companion files, and advises copying them before reading so that recent messages are not missed. Key tables such as message, handle, chat, and attachment are outlined, along with how they are joined to link messages, senders, and conversations. Dates are stored as nanoseconds counted from 2001 rather than Unix time, and the article provides the conversion formula along with sample SQL queries. The author notes that the example output was produced from a test database because the real one was empty on the test machine.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in