cannot decode object of class (InstantMessage)
russellaugust opened this issue · comments
Running into a problem trying to decode a iChat archive. Any help would be much appreciated!
I'm running:
python unarchive_plist.py \
-r "myfriend on 2008-04-18 at 00.07.ichat" \
-f xml1 \
-w test.xml
and my output error is:
[ERROR] NSInvalidUnarchiveOperationException - *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (InstantMessage) for key (NS.objects); the class may be defined in source code or a library that is not linked
Hi @russellaugust, It's been awhile since I looked at this code!
It appears there isn't a class definition for InstantMessage, so NSKeyedUnarchiver cannot unarchive it.
If you found the class, or reversed and defined it yourself, you could add the following before the unarchiveObjectWithFile_
call and NSKeyedUnarchiver should work: NSKeyedUnarchiver.setClass_forClassName_(instant_message_object, "InstantMessage")
I don't expect defining the InstantMessage class to be easy. I would probably just live with the XML conversion that plutil provides: plutil -convert xml1 myfriend.ichat -o myfriend.xml
Hope this helps!
thanks @whyallyn I'll stick to the plutil