小弟有两个问题:
一。之前在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;
}
想问一下,这是为什么 谢谢

解决方案 »

  1.   

      sqlite3_stmt *statment = NULL;为啥==NULL。
      

  2.   

      2.-[NSConcreteMutableData getCharacters:range:]: unrecognized selector sent to instance 0x8644340
    总结一下:就是旧版本到新版本需要又什么改动啊。能给个链接或者详细的demo(magicadong932056@sina。com)这个得你自己去查api
      

  3.   

    1.Applications are expected to have a root view controller at the end of application launch
    查看下,你的ROOT viewController是不是设置了就是你页面对应的第一个ViewController,对应window窗口的显示页面。或者委托delegate方法里有没有写明2NSConcreteMutableData getCharacters:range是说这个方法有变更,找不到
    3while (sqlite3_step(statment) == SQLITE_ROW)我数据库接触的少,  是不是statement  你忘记给 赋值了?一直都是nil的?EXC_BAD_ACCESS:常见都是释放过多导致