简体   繁体   English

如何使用Xcode 4.0.2在iOS 5设备上调试崩溃?

[英]How to debug a crash on an iOS 5 device with Xcode 4.0.2?

I've just released my first app to the app store. 我刚刚向应用商店发布了我的第一个应用。

I've been developing the app with Xcode 4.0.2 with iOS 4.2.1 devices. 我一直在使用Xcode 4.0.2和iOS 4.2.1设备开发应用程序。 Because my device is a 2nd gen iPod Touch I can't get iOS 5 on it so I can't use Xcode 4.1 with it which also means I can't build to iOS 5 devices with my version of Xcode. 因为我的设备是第二代iPod Touch,所以我无法在其上安装iOS 5,因此无法在其上使用Xcode 4.1,这也意味着我无法使用我的Xcode版本构建到iOS 5设备。

My friend who has a 3GS running iOS 5 has just downloaded the app, and one specific section of it crashes when tapped (aaaah!) - it works fine for me. 我的朋友拥有运行iOS 5的3GS,刚刚下载了该应用程序,点击该应用程序的其中一个特定部分会崩溃(aaaah!)-它对我来说很好用。

I've just looked at his crash logs and they just show EXC_CRASH(SIGBART) - with nothing that can really help me determine the cause of the error. 我刚刚看了他的崩溃日志,它们只显示了EXC_CRASH(SIGBART) -没有什么可以真正帮助我确定错误原因。

I considered building to his device to get the runtime crash log (which shows an actual code-level exception), but I realised I can't because I'm using Xcode 4.0.2. 我考虑过要在他的设备上构建以获取运行时崩溃日志(该日志显示了实际的代码级异常),但我意识到我无法这样做,因为我正在使用Xcode 4.0.2。

I can't upgrade my Xcode version because then I won't be able to test on devices myself! 我无法升级我的Xcode版本,因为那样我将无法自己在设备上进行测试!

What can I do? 我能做什么?

The current Xcode version is 4.2 which does support debugging on devices with iOS 4.2.1 as I use an old iPhone 3G with 4.2.1 for debugging. 当前的Xcode版本是4.2,它确实支持在iOS 4.2.1的设备上进行调试,因为我使用的是带有4.2.1的旧版iPhone 3G进行调试。

In Xcode 4.2 there is also a new section in the preferences window that says "Downloads". 在Xcode 4.2中,首选项窗口中还有一个新部分,显示“下载”。 From that tab you can download additional packages, one of them is support for debugging with even older iOS devices. 从该选项卡中,您可以下载其他软件包,其中之一是甚至可以使用较旧的iOS设备进行调试。

You can install a second copy of Xcode in a separate developer folder and then test using the latest Xcode with iOS5 in the simulator. 您可以在单独的开发人员文件夹中安装Xcode的第二个副本,然后在模拟器中使用最新的Xcode与iOS5进行测试。 There's a blog about how to install multiple Xcode versions here: 这里有一个有关如何安装多个Xcode版本的博客:

http://useyourloaf.com/blog/2010/9/7/installing-multiple-xcode-versions.html http://useyourloaf.com/blog/2010/9/7/installing-multiple-xcode-versions.html

If you can't reproduce in the simulator, I suggest borrowing his device (you'll still need to install the latest Xcode though). 如果您无法在模拟器中进行复制,建议您借用他的设备(不过,您仍然需要安装最新的Xcode)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM