When our app went online, there were still some problems of flash back more or less, and it was impossible to debug and obtain crash information at this time. Some crash logs will be uploaded to the background (if the interface provides it to you and you do it yourself), but some crash logs will only be found on the user’s iPhone or other device.

For developers, some crash logs can be found without the user providing the log file. In this case, you need to check whether the package of the flash back app was packaged on your Mac:

Native: Then Crash can be symbolized directly in Xcode’s Organizer

Non-native: Symbolicatecrash command, dSYM file

How do you symbolicatecrash a crash file using the symbolicatecrash command

1. Obtain crash logs

(1) This machine is packed

Windows—->Organizer, directly view Archives, then select your app and the corresponding version, here you can clearly see the crash location, machine number and model, etc

(2) Non-local packaging

It used to be in Settings -> Privacy -> Diagnostics & Usage -> Diagnostics & Usage Data. Now it’s in Settings -> Privacy -> Analysis -> Analysis Data. These data can be synced to Mac and Xcode via iTunes. Change the file name to app name. Crash

2. Export dSYMs and IPA packages

Archive success at a time, there will be corresponding Archive file, the file path is/Users/username/Library/Developer/Xcode/Archives/directory. Find the corresponding file and open it to see the corresponding Archive file. Right click on the project and then click Show package contents to see the corresponding folder. The contents in the folders dSYMs and Products are what we need. Open the two folders, find the corresponding. DSYM and. App files, and place them in the same folder as the crash logs exported in the previous step.

Find the path where Symbolicatecrash is located

find /Applications/Xcode.app -name symbolicatecrash -type f

/ Applications/Xcode. App/Contents/SharedFrameworks/DVTFoundation framework Versions/A/Resources/symbolicatecrash wait for A while, We’ll see output four paths by platform but we need to take the fourth path as above

After the preceding three steps are complete, run the following commands

(1) CD < directory > (ipa,dSYM,crash file common parent path)

(2)

Export DEVELOPER_DIR = / Applications/XCode. App/Contents/Developer (3) to run

/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash ./.crash ./.app.dSYM > symbol.crash

Warning:

[1] The symbolicatecrash command was acquired by running a copy of the path above.

[2] While switching to the current folder where ipA,dSYM, and crash files reside, Such as/Applications/Xcode. App/Contents/SharedFrameworks/DVTFoundation framework Versions/A/Resources/symbolicatecrash Demo.crash demo.app.dSYM > symbol.crash But the blog still failed to find the file path, will generate 0KB file, as follows:

So use the path./.crash./*.app.dsym > symbol.crash instead of the./ descriptor, so there is no problem

The parse file looks like this:

— — — — — — — —

Copyright notice: This article is originally published BY CSDN blogger “MinggeQingchun”, in accordance with CC 4.0 BY-SA copyright agreement. Please attach the original source link and this statement. The original link: blog.csdn.net/MinggeQingc…