几个bug的原因

前端之家收集整理的这篇文章主要介绍了几个bug的原因前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、[NSArray arrayWithObjects: [ NSNumber numberWithInt:_id],[NSString stringWithUTF8String:_name]];

warning: missing sentinel in function call@H_301_4@

原因:NSArray 数组最后缺少一个 nil。

2、char *csql = [sql UTF8String];

warning: initialization discards qualifiers from pointer target type@H_301_4@

原因:缺少限定词 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@H_301_4@ 'Entity1' 原因:coredata 的相关对象还没有实例化

原文链接:https://www.f2er.com/sqlite/202140.html

猜你在找的Sqlite相关文章