在下载新的Xcode之前,我的应用程序运行良好,现在它由于错误“signal SIGABRT”而停止,并指出了这一点:
[PlaceHolder setDescription:]: unrecognized selector sent to instance 0x79838900
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PlaceHolder setDescription:]: unrecognized selector sent to instance 0x79838900'
我知道,这些信息可能不足以了解正在发生的事情,但是我不知道从哪里开始搜索。如果setter方法出错,为什么我的应用程序以前可以工作?是否有任何阻止应用启动的新更改?
PlaceHolder
是一个对象,其中包含属性(例如图像链接,文本等)。此外,还有一个新的“黄色”警告-
Auto property synthesis will not synthesize property 'description' because it is 'read-write' but it will be synthesized 'read-only' via another property
最佳答案
看来您已经定义了description
属性。不幸的是NSObject
已经有一个 description
方法。由于您可能不是故意在子类中尝试重写此方法,因此这可能不是安全的操作。在iOS 7 SDK和Xcode 5下,您的属性似乎替换了NSObject
上的方法。在iOS 8 SDK和Xcode 6中不是这种情况(可能是由于-description
方法的定义方式发生了变化),所以您得到了不同的行为。
考虑重命名此属性以避免此类冲突。 description
是一种有用的调试工具,您可能不想意外放弃该类。
关于ios - 无法使用新的Xcode 6启动应用程序,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25927023/