本文介绍了UIAlertView导致iOS SDK 6.0崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近向App Store提交了一个尚未被接受的应用程序。同时,我下载了Xcode 4.5并在iPhone 6.0模拟器中测试了我的应用程序。

I recently submitted an app to App Store that has not been accepted yet. Meanwhile, I downloaded Xcode 4.5 and tested my app in iPhone 6.0 Simulator.

然而,当我打算显示 UIAlertView 时,应用程序崩溃 [myAlertView显示] EXC_BAD_ACCESS 错误。它适用于iPhone 5.1模拟器。

However, when I intend to show an UIAlertView, the app crashes on [myAlertView show] line with EXC_BAD_ACCESS error. It works fine with iPhone 5.1 Simulator.

这是我的代码:

UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Warning" message:@"Are you sure?" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
[myAlertView show];

这是正常的吗?我的代码出了什么问题?

Is that normal? What am I doing wrong with my code?

另外,您认为我应该将我的应用程序重新发送给Apple吗?(只是询问您的建议)

Also, do you think I should resend my app to Apple?(Just asking your advice)

谢谢提前。

编辑:由于iOS 6崩溃,Apple拒绝了该应用。

Apple has rejected the app because of iOS 6 crash.

推荐答案

请参阅此相关问题:

用户输入和UI调用必须来自主线程。他们中的许多人将在其他线程上大部分工作,但有时会崩溃。它们更有可能在模拟器上以不同的方式(或多或少地)在设备上发生崩溃,但Apple可能会做出改变,影响iOS6中的差异。

User input and UI calls must come from the main thread. Many of them will work "most" of the time on other threads, but sometimes will crash. They are more likely to crash differently (more or less often) on a device than the simulator, but it's possible Apple made changes that affect that difference in iOS6.

并且你的第二个问题,我会回答是的,我会在你解决问题后立即上传更新的二进制文件,特别是如果你可以在设备上重现这一点(我强烈建议你尝试在设备上重现它)。否则,你可以A)接受用户讨厌的错误,或者B)被拒绝并且有更长的延迟和可能更严格的审查。如果您在审核完成之前发送更新的二进制文件,它确实会让您处于AFAIK的后方,但比其他选择更好。

And to your second question, I would answer yes, I would upload an updated binary for review as soon as you fix the issue, especially if you can reproduce this on a device (I strongly encourage you to attempt to reproduce it on a device). Otherwise, you may A) get accepted with a bug your users hate, or B) get rejected and have a an even longer delay and possibly more scrutiny. If you send an updated binary before review finishes it does put you at the "back of the line" AFAIK, but better than the alternatives.

这篇关于UIAlertView导致iOS SDK 6.0崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 19:31