关于XCode版本和sqlite3 的问题,,急,谢谢
小弟有两个问题:
一。之前在xcode4.2做的项目,今天更新到4.3之后,没法运行
错误报告:1.Applications are expected to have a root view controller at the end of application launch
2.-[NSConcreteMutableData getCharacters:range:]: unrecognized selector sent to instance 0x8644340
总结一下:就是旧版本到新版本需要又什么改动啊。能给个链接或者详细的demo(magicadong932056@sina。com)
二。之前有个项目。在XCode模拟器上运行是OK的。但是在iPod touch上运行时就报错。其中用到了数据库,
- (int)selectURL:(NSString *)urlString {
NSString *string = [NSString stringWithFormat:@"%@",urlString];
NSString *selectSQL = [NSString stringWithFormat:@"SELECT ID FROM %@ WHERE URL='%@'",FILEID_URL_TABLE,string];
sqlite3_stmt *statment = NULL;
if (sqlite3_prepare_v2(dataBase,[selectSQL UTF8String],-1, &statment, NULL) == SQLITE_OK)
{
while (sqlite3_step(statment) == SQLITE_ROW) {这句报错EXC_BAD_ACCESS
int id = sqlite3_column_int(statment, 0);
NSLog(@" exist in SQL %@",string);
return id;
}
}
NSLog(@" doesn't in SQL %@",string);
return -1;
}
想问一下,这是为什么 谢谢