没有重写 归档和反归档的方法 编译报错

来源:互联网 发布:老司机求网址 知乎 编辑:程序博客网 时间:2024/06/05 12:40
归档 -(void)encodeWithCoder:(NSCoder *)aCoder
反归档 -(id)initWithCoder:(NSCoder *)aDecoder

/Users/lanou3g/Library/Application Support/iPhone Simulator/7.1/Applications/ACCCDEBB-2FE3-4B9C-B7FD-4B3522884437/Documents/DB.sqlite
2014-12-18 21:15:25.264 TuanGouApplication[2698:60b] -[Good encodeWithCoder:]: unrecognized selector sent to instance 0x8c37750
2014-12-18 21:15:25.285 TuanGouApplication[2698:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Good encodeWithCoder:]: unrecognized selector sent to instance 0x8c37750'
2014-12-18 21:15:25.285 TuanGouApplication[2698:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Good encodeWithCoder:]: unrecognized selector sent to instance 0x8c37750'

还需要注意
在使用归档和反归档是 未导入 链接库文件(未定义的符号为架构,也就是没有引用sqlite3库文件)
0 0