I am trying to decode a 3rd party archive encoded in the old NSArchiver (not
keyed) format. At a point in the decoding, I expect to find a CGRect, but when
I call
[coder decodeValueOfObjCType:@encode(CGRect) at:myRect]
an exception is raised with the error:
file inconsistency: read
Are you decoding it from a 64 bit app? Because CGRect on 64 bits is made of
doubles, while on 32 bits (where it was probably encoded) it was made of
floats
Also, the exact format for @encode() varies greatly between compiler version
(especially with regards for things like structure names
Brilliant. Thank you Glenn. I compiled the app for 32 bit and it read the
archive fine. I've created my own struct with floats for reading the archive in
64 bit and am coercing the data into doubles after the decoding.
~Phil
On Jul 13, 2011, at 12:30 PM, glenn andreas wrote:
Are you decoding