使用XCode 3.2.5我可以使用4.2 SDK在iOS模拟器上运行我的应用程序。但是,它崩溃了以下函数,更具体地说,是presentModalViewController调用:
- (void)login {
//check to see if they logged in correctly here
/*UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Login Failed!"
delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];*/
[self presentModalViewController:self.accountsViewController animated:YES];
}
然而,在XCode 4 Dev Preview上,我甚至无法在模拟器中访问4.2 SDK,所以我不得不使用4.0 SDK。在4.0中,该函数可以找到并按预期方式运行。我有两个问题:
为什么模拟器中的4.2 SDK没有报告它在XCode 3.2.5中崩溃的原因?过去,当我的应用程序在模拟器中以调试模式崩溃时,XCode会弹出原因。但是,现在已经不存在了。
为什么这个简单的行会在4.2中崩溃而不是4.0。可能是不同的XCode版本吗?
答案 0 :(得分:0)
XCode版本之间存在某种奇怪的问题。我仅使用XCode 3.2.5重新创建了整个添加,现在可以使用相同的代码。