ReagentX has built an open-source tool “iMessage exporter” for users to create a library of all communication with family, friends, or colleagues. The binary allows users to easily access iMessage chats as native data structures so users can even print and preserve memorable texts.
I’ve spent a long time reverse engineering nearly every aspect of Apple’s iMessage SQLite tables to build this program. As far as I know, there are no other tools that support the full corpus of iMessage features, including edited messages, app messages, reactions, and threads.
Here are all the features supported by iMessage exporter on macOS 13.1
Texts, edited and unsent messages, multiple-part messages, threads and message replies, group chats, attachments, expressive (bubbles, screen effects), reactions, stickers, Apple Pay, SharePlay/Facetime message balloons, Apple Music preview streams, system message types as well as third party applications and much more.
The tool can also run diagnostics to find problems with iMessage data. The developer describes:
- For the curious, here are some of the more interesting aspects of the database I came across:
- Dates are stored as Unix time stamp with an epoch of 2001-01-01 00:00:00
- Messages can have multiple parts, denoted by some special invisible characters
- Reactions are stored by prefixing the GUID of the reacted message with the index of the message part.
- URL messages cache data in the table, which we can parse and display. This is useful for understanding the context of rotten links.
- Edited messages store the history of message edits. I wanted to try out DDD here, which was fun!
iMessage exporter is available on GitHub for free. It is optimized for the latest macOS version and iMessage. You can install the software either through crates.io or manually; clone the repository > cd to the repository > cargo run –release to compile.