几个bug的原因
1、[NSArray arrayWithObjects: [ NSNumber numberWithInt:_id],[NSString stringWithUTF8String:_name]]; warning: missing sentinel in function call 原因:NSArray 数组最后缺少一个 nil。 2、char *csql = [sql UTF8String]; warning: initialization discards qualifiers from pointer target type 原因:缺少限定词 const 3、char* _name = (char*)sqlite3_column_text(statement,2); 数据库中有值,但是 _name 一直是空 原因:sqlite3_column_text 第二个参数的序号,从0开始数的,不是从1。 4、could not locate an NSManagedObjectModel for entity name 'Entity1' 原因:coredata 的相关对象还没有实例化 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |