top | item 42919221

Reverse Engineering Apple's typedstream Format

127 points| css | 1 year ago |chrissardegna.com

25 comments

order

wpm|1 year ago

This is perfectly timed, as I wanted to find a way to programmatically modify my Mac's AppleScript display settings/theme. For whatever reason, they're stored as typedstream format, embedded in a plist in base64. Found an old implementation/header from 1999 from Mac OS X Server v1.2, signed by Bertrand Serlet, and was going to dig in when I found the time. Now I can dig into this.

css|1 year ago

The plist is probably a binary plist (header bytes `bplist00`) generated by NSKeyedArchiver, and then the specific data you need is encoded inside. Edited iMessages are stored in the exact same way. Luckily the plist itself is not that complex–but typedstream is pesky to work with.

nativeit|1 year ago

Question from a relatively uninformed sysadmin/freelance I.T. provider—will these new iMessage functions allow for 3rd-party applications (ie—CRMs, client support platforms, etc.) to read and/or work with incoming iMessages from my iCloud account? The only thing I really miss since coming from Android was my ability to consolidate all of my client communications, many of whom send text messages first and foremost (which I prefer).

bengarney|1 year ago

I have a product that does exactly this. E-mail me at ben AT theengine DOT co, I'd love to show it to you and see if it would help.

setr|1 year ago

Don’t know if it helps, but I know iMessage stores message data on MacBooks inside a SQLite file; I was scanning through it previously because I was trying to do a bulk search

dbyte|1 year ago

The grandfather of protobuf. Lost in the tales of time.

dim13|1 year ago

Grandfather of Protobuf is ASN.1

css|1 year ago

iMessage uses a very strange amalgamation of typedstream (message content), keyed archives (app messages, sticker data), and protobufs (Digital Touch, handwriting) for different features. I wonder what motivated all of those design decisions.

swiftcoder|1 year ago

Nice writeup! I wonder if gnustep's NSUnarchiver could be augmented for full compatibility with Foundation?