nskeyedarchiver 在 OS X 和 iOS 之间的兼容性
如果我在桌面 cocoa 应用程序和 iOS 应用程序之间共享一个实现 NSCoding 协议的类,我是否也能够在这两个应用程序之间共享通过归档对象创建的数据文件?
If I share a class implementing the NSCoding protocol between a desktop cocoa application and an iOS application, will I also be able to share a datafile created by archiving an object between those two applications?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 NSKeyedArchiver 存档的文件在两个平台之间兼容。您只需留意在两个平台上均不可用的类,例如:
由于这些类在两个平台上均不可用,因此您将无法在另一个平台上取消存档它们。
Files archived with NSKeyedArchiver are compatible between both plattforms. You just have to look out for classes that are not available on both plattforms like:
Since those are not available on both plattforms you will not be able to unarchive them on the other plattform.