重命名Xcode项目后出现NSKeyedUnarchiver错误 [英] NSKeyedUnarchiver error after renaming Xcode project

查看:824
本文介绍了重命名Xcode项目后出现NSKeyedUnarchiver错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚重命名了我的Xcode项目,当我运行它时出现了这个错误:

I just renamed my Xcode project and when I ran it I got this error:


2015-11-14 05:32: 42.337 Buck Tracker [3537:1456100] *由于未捕获的异常'NSInvalidUnarchiveOperationException'终止应用程序,原因:'* - [NSKeyedUnarchiver decodeObjectForKey:]:无法解码类的对象(iBudgeter.Record)以获取密钥( NS.objects);该类可以在源代码中定义,也可以在未链接的库中定义'

2015-11-14 05:32:42.337 Buck Tracker[3537:1456100] * Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '* -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (iBudgeter.Record) for key (NS.objects); the class may be defined in source code or a library that is not linked'

Buck Tracker 是新名称, iBudgeter 是原始名称。 记录是我创建的用于存储一些数据的自定义 NSObject

The Buck Tracker is the new name and iBudgeter is the original name. Record is a custom NSObject I created to store some data.

我尝试将项目重命名为 iBudgeter ,但它无效。恢复到git中的先前版本确实有帮助,但是当我再次重命名时我得到了同样的错误。

I tried renaming the project back to iBudgeter but it didn't work. Reverting to a previous version in git did help but I got the same error when I renamed it again.

那么有什么建议吗?

推荐答案

请勿更改项目名称。只需更改显示名称即可。它是Info.plist中的Bundle display name条目。您可能需要添加条目。

Don't change your project name. Just change the display name. It's the "Bundle display name" entry in your Info.plist. You'll probably need to add the entry.

如果要更改OS X应用程序的显示名称,请参阅此答案

See this answer if you want to change the display name of an OS X app.

这篇关于重命名Xcode项目后出现NSKeyedUnarchiver错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆