开发者

Unarchiving iOS4 data on iOS5 doesn't work

开发者 https://www.devze.com 2023-04-13 03:41 出处:网络
I\'ve archived an NSDictionary on iOS 4 using an NSKeyedArchiver, but unarchiving on iOS 5 using [NSKeyedUnarchiver unarchiveObjectWithData: data]

I've archived an NSDictionary on iOS 4 using an NSKeyedArchiver, but unarchiving on iOS 5 using

[NSKeyedUnarchiver unarchiveObjectWithData: data]

throws this exception

*** Terminating app due to uncaught exce开发者_运维百科ption 'NSInvalidArgumentException',
reason: '*** -[NSKeyedUnarchiver initForReadingWithData:]:
incomprehensible archive (0x62, 0x70, 0x6c, 0x69, 0x73, 0x74, 0x30, 0x30)'

Note that unarchiving on iOS 4 works fine. plutil -lint reports that the archive is okay. Here it is, for reference:

http://www.complang.tuwien.ac.at/schani/monkeyfull.ltg

0

精彩评论

暂无评论...
验证码 换一张
取 消