使用 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 版本?