如何符号化来自 Xamarin Forms iOS 项目的崩溃/错误日志? [英] How to symbolicate crash/error logs from a Xamarin Forms iOS project?

查看:23
本文介绍了如何符号化来自 Xamarin Forms iOS 项目的崩溃/错误日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要符号化一些崩溃日志,为此我读到我需要 .app 和 .dSYM 文件以及 .crash 文件.

I need to symbolicate some crash logs and for that I read that I need the .app and the .dSYM files together with the .crash files.

我在任何地方都找不到 .app 文件.我有 .app.dSYM 文件和 .crash 文件,但我找不到 .app 文件.

I can't find the .app file anywhere. I have the .app.dSYM file and the .crash ones but I can't find the .app one.

我还可以在 Xcode Organizer 上看到我的错误日志.但是我的应用程序中的行没有符号化.如果我点击箭头打开一个项目,我不知道要打开哪个文件.

I can also see my error logs on the Xcode Organizer. But the lines from my Application are not symbolicated. And if I click on the arrow to open with a project, I have no idea which file to open.

谢谢

推荐答案

当你构建你的 iOS 项目时,你应该在 bin/iPhone/Release 中有 .app 文件代码>目录.或者,如果您有 .ipa 文件,您可以从中提取 .app.您可以将文件重命名为 .zip 并解压缩..app 将位于 Payload 文件夹中.在 Windows 上,它可能有点混乱,因为图标可能看起来像文件夹或目录.检查文件扩展名.在 Mac 上,它应该识别 .app 并且它可能根本不显示扩展名.相反,它看起来像这样:

When you build your iOS project, you should have the .app file in the bin/iPhone/Release directory. Or, if you have the .ipa file, you can extract the .app from that with. You can rename the file to have .zip and extract. The .app will be in the Payload folder. On Windows, it can be a little confusing because the icon might look like a Folder or Directory. Check the file extension. On Mac, it should recognize a .app and it might not show the extension at all. Instead, it looks like this:

重要提示:您需要使用生成崩溃报告的同一个 .app 文件.这意味着您必须使用安装在生成崩溃报告的设备上的包中的 .app.希望您将其存档或保存在某处.简单地重建项目以获取新的 .app 不会在符号化过程中与 .crash 文件匹配,并且不会工作.如果您无权访问它,则需要再次发布,这一次保留 .app 以备下次分析 .crash 时使用.

Important: You need to use the same .app file that generated the crash report. This means you would have to use the .app from the package you installed on the device that generated the crash report. Hopefully, you archived that or saved it somewhere. Simply rebuilding the project to get a new .app will not match up with the .crash file during symbolication and will not work. If you don't have access to that, you will need to publish again and this time keep the .app around for the next time you get a .crash to analyze.

要手动符号化,我有一篇关于执行此操作的博客文章here.总而言之,以下是步骤:

To manually symbolicate, I have a blog post about doing this here. To summarize, here are the steps:

打开终端并针对您的 Xcode 版本运行以下命令之一:

Open Terminal and run one of these commands for your version of Xcode:

Xcode 7.X
alias symbolicate="/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash -v"  

通过将其别名为symbolicate 命令,这只是使symbolicatecrash 工具的使用更容易,因此我们不必导航到该目录来运行命令.

This just makes using the symbolicatecrash tool easier by aliasing it to a symbolicate command so we don't have to navigate to that directory to run the command.

运行这个命令:

export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"

象征性

再次打开终端并 cd 到您在上述步骤中放置文件的目录.运行我们之前使用您的 .crash 和 .app 文件作为参数别名的 symbolicate 命令,如下所示:

symbolicate -o "symbolicatedCrash.txt" "MyAppName 2-12-14, 9-44 PM.crash" "MyAppName.app"

这将对崩溃文件进行符号化,并将结果输出到名为symbolicatedCrash.txt"的新文件中.确保更正我示例中的文件名以匹配您的文件名.

This will symbolicate the crash file and spit out the result in a new file named "symbolicatedCrash.txt". Make sure that correct the file names from my example to match yours.

这篇关于如何符号化来自 Xamarin Forms iOS 项目的崩溃/错误日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆