【问题标题】:iOS App Crashing on iOS 4.2 but not 4.0, simulator not showing logsiOS App 在 iOS 4.2 但不是 4.0 上崩溃,模拟器不显示日志
【发布时间】:2011-05-18 01:22:30
【问题描述】:

使用 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 上,我什至无法在 Simulator 中访问 4.2 SDK,所以我不得不使用 4.0 SDK。在 4.0 中,该功能按预期工作。我有两个问题:

  1. 为什么模拟器中的 4.2 SDK 没有报告它在 XCode 3.2.5 中崩溃的原因?以前我的应用在模拟器调试模式下崩溃时,XCode会弹出原因。但是,它不再是了。

  2. 为什么这个简单的行会在 4.2 而不是 4.0 中崩溃。会不会是不同的 XCode 版本?

【问题讨论】:

标签: xcode ios4 xcode3.2 xcode4


【解决方案1】:

这是 XCode 版本之间的某种奇怪问题。我仅使用 XCode 3.2.5 重新创建了整个添加,并且现在可以使用完全相同的代码。

【讨论】:

    猜你喜欢
    • 2012-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-13
    • 1970-01-01
    • 1970-01-01
    • 2011-07-24
    • 1970-01-01
    相关资源
    最近更新 更多