Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSArchiver output incompatible with vanilla NSUnarchiver #11

Open
gregzo opened this issue Dec 2, 2015 · 2 comments
Open

NSArchiver output incompatible with vanilla NSUnarchiver #11

gregzo opened this issue Dec 2, 2015 · 2 comments

Comments

@gregzo
Copy link

gregzo commented Dec 2, 2015

Objects serialized with NSArchiver can't be deserialized with vanilla NSUnarchiver. Looking at the raw data, it seems that the 2 serialisation formats simply are different. Am I missing something?

Awesome project, by the way - invaluable learning tool.

@cjwl
Copy link
Owner

cjwl commented Dec 2, 2015

Last I checked, the NSArchiver non-keyed format was not documented so we're not able to reliably decode it. The existing implementation is for cococtron to cocotron encoding/decoding. If the Apple encoding is documented this could be addressed.

I'd recommend switching to keyed archiving if that is an option, the format is documented enough and is implemented in cocotron.

@gregzo
Copy link
Author

gregzo commented Dec 2, 2015

I've been spending the day reverse engineering the format - looks doable, but I'm not that experienced in serialisation. Just spotted this which helps a lot: https://github.com/depth42/MEUnarchiver

I need to serialise as well as deserialize, in C++. For my current project, I'm confident I can hack something together to handle basic NSAttributedString serialisation supporting just the types I need, but nothing exhaustive nor solid...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants