NSKeyedUnarchiver fails to decode a custom object in swift

故事扮演 提交于 2019-12-04 06:02:20

As Martin pointed out the in the comments, the code works fine in a compiled app, so it's definitely a playground bug.

David, in the comments, suggested to use @objc(User) in order to get a non-mangled class name, but it didn't help in this specific case, so - as of beta 2 - I still haven't find a workaround to make it work in the playground.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!