Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
576 views
in Technique[技术] by (71.8m points)

xamarin.ios - How to symbolicate crash/error logs from a Xamarin Forms iOS project?

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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:

enter image description here

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...