from Hacker News

Show HN: iMessage-exporter, a full-featured CLI app and library

by css on 1/10/23, 4:30 PM with 2 comments

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.

I built this software to preserve some conversations with loved ones; I hope others find it useful as well.

For the curious, here are some of the more interesting aspects of the database I came across:

- Dates are stored as Unix timestamp with an epoch of 1/1/2001 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 [0].

- URL messages cache data in the table, which we can parse and display [1].

- Edited messages store the history message edits [2] (I wanted to try out DDD here, which was fun!).

[0]: https://docs.rs/imessage-database/latest/imessage_database/m...

[1]: https://docs.rs/imessage-database/latest/imessage_database/m...

[2]: https://docs.rs/imessage-database/latest/imessage_database/m...

  • by TimSchumann on 1/17/23, 7:02 PM

    Honestly, don't understand why this didn't get more traction here.
  • by jay-barronville on 1/13/23, 12:26 PM

    Good work. I’m going to test this out. Thank you.