How to symbolicate crash/error logs from a Xamarin Forms iOS project?

独自空忆成欢 提交于 2019-12-13 11:44:13

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/38579117/how-to-symbolicate-crash-error-logs-from-a-xamarin-forms-ios-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!