如何从Xamarin Forms iOS项目中象征崩溃/错误日志? [英] How to symbolicate crash/error logs from a Xamarin Forms iOS project?

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

问题描述

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

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

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

谢谢

解决方案

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

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

要手动表示符号,我在此处上有一篇博客文章.总结一下,步骤如下:

创建别名

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

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

这只是将symbolicatecrash工具别名为符号命令,从而使使用symbolicatecrash工具更加容易,因此我们不必导航到该目录即可运行命令.

更新开发者目录

运行此命令:

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"的新文件中.确保从我的示例中更正文件名以匹配您的文件名.

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.

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.

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.

Thanks

解决方案

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:

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.

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

Create an Alias

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"  

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.

Update the Developer Directory

Run this command:

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

Symbolicate

Open Terminal again and cd to the directory where you placed your files in the step above. Run the symbolicate command we aliased before with your .crash and .app files as the parameters like this:

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

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天全站免登陆