XCode 4.6 组织者不象征我的应用程序崩溃堆栈跟踪

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15309116/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 02:56:22  来源:igfitidea点击:

XCode 4.6 organizer does not symbolicate my app crash stack trace

iosxcodecrashorganizersymbolicate

提问by abix

It has been a while since I used symbolicate in XCode and it used to work. Today when I tried this...

自从我在 XCode 中使用符号化已经有一段时间了,它曾经可以工作。今天当我尝试这个...

  1. Archive my app.
  2. Install the app on my device from XCode. (Just connect the device and run the app in release mode).
  3. Stopped the app from Xcode.
  4. Ran the app on my device (which is connected to the Mac) which of course crashed.
  5. Now when I open Organizer and go to Device logs, it shows a new crash log file.
  6. But it fails to symbolicate the symbols of my app. All Apple library stuff are symbolicated fine.
  1. 存档我的应​​用程序。
  2. 从 XCode 在我的设备上安装该应用程序。(只需连接设备并在发布模式下运行应用程序)。
  3. 从 Xcode 停止应用程序。
  4. 在我的设备(连接到 Mac)上运行应用程序,当然它崩溃了。
  5. 现在,当我打开管理器并转到设备日志时,它会显示一个新的崩溃日志文件。
  6. 但它无法象征我的应用程序的符号。所有 Apple 图书馆的东西都被象征性地很好。

I searched all over the net, nothing seems to work.

我搜索了整个网络,似乎没有任何效果。

Edit: In the Build Settings if I disable "Strip Debug Symbol During Copy" even for release build, everything works fine. But Xcode should have been able to symbolicate using the dSYM file I guess. I do not want to distribute the app with debug symbols.

编辑:在构建设置中,如果我禁用“复制期间的剥离调试符号”,即使对于发布版本,一切正常。但是我猜 Xcode 应该能够使用 dSYM 文件进行符号化。我不想分发带有调试符号的应用程序。

Thanks in advance.

提前致谢。

采纳答案by Kerni

This article will help finding where the problem is: http://support.hockeyapp.net/kb/how-tos-faq/how-to-solve-symbolication-problems

这篇文章将有助于找出问题所在:http: //support.hockeyapp.net/kb/how-tos-faq/how-to-solve-symbolication-problems

Since you say you run in release mode, the version running on the device is NOTthe one that you archived! So if there is a release build already available in the DerivedDatadirectory, it will take that. Otherwise it will create a new build and install that one.

既然你说你run in release mode,设备上运行的版本不是你存档的版本!因此,如果DerivedData目录中已有可用的发布版本,则将采用该版本。否则,它将创建一个新版本并安装该版本。

Now there are two possibilities why symbolication doesn't work:

现在有两种可能为什么符号化不起作用:

  1. You are doing another release build later on, so the previous build and dSYM get overwritten (see explanation in the link above)
  2. Spotlight doesn't find the dSYM and app binary with the UUID written in the crash report (see explanation in the link above to verify that)
  1. 您稍后将进行另一个版本构建,因此之前的构建和 dSYM 会被覆盖(请参阅上面链接中的解释)
  2. Spotlight 在崩溃报告中找不到带有 UUID 的 dSYM 和应用程序二进制文件(请参阅上面链接中的解释以验证这一点)

Update: Note regarding stripping symbols: when you don't strip the symbols as mentioned in your edited post, the symbolication is done on the device already. But of course you will be missing the line numbers.

更新:关于剥离符号的注意事项:当您没有像编辑的帖子中提到的那样剥离符号时,符号化已经在设备上完成了。但当然你会错过行号。

回答by abix

Upon following the link given by Kerni in the above solution, I found that it was spotlight which was not able to find the dSYM file using UUID of the crash log file.

按照上述解决方案中 Kerni 提供的链接,我发现无法使用崩溃日志文件的 UUID 找到 dSYM 文件是一个亮点。

Running following command...

运行以下命令...

mdimport .

导入。

... in the product folder (the one where MyApp1.app and myApp.app.dSYM are located) the problem was resolved.

...在产品文件夹(MyApp1.app 和 myApp.app.dSYM 所在的文件夹)中,问题已解决。

I am not sure why I have to run it every time I build my application, my mac is not doing it automatically for some reason. But it works.

我不确定为什么每次构建应用程序时都必须运行它,我的 mac 由于某种原因没有自动运行。但它有效。

回答by jdtogni

I have installed Xcode on a directory with white spaces. I fixed it by removing the white spaces of the directory and run xcode-select. (mdimport didnt work for me)

我已经在一个带有空格的目录上安装了 Xcode。我通过删除目录的空格并运行 xcode-select 来修复它。(mdimport 对我不起作用)

    sudo xcode-select -switch <myxcodedir>