NSArchiver and pointers ? Not anymore.
Another one of these not-so-precious WTF moments... I am probably just too late to catch up, but pointer values in archives are not possible anymore. And the exception message is kinda lacking...
crashes on 32 bit and 64 bit Intel, because
void * is now not a "known type" anymore ?
2015-06-18 12:00:35.878 NSArchiver[3746:50892] *** Terminating app due to uncaught exception 'NSArchiverArchiveInconsistency', reason: '*** type descriptor error for '^' in '^v': unknown type descriptor'
How to this better: The Archiver should have a method that is "setNonPersistable:". Whenever one is encoding a pointer, the encoding routine should be setting that flag. This flag would be part of the archive header.
That way an archive would know if it was safe to be persisted or not. That would keep archives trivially usable as an intra-process facility and you would have a clue, when archives get persisted/unpersisted, what has gone wrong.