- How to use dSYM to symbolize crash logs. Analyze online crash
- 1 get the unresolved crash log.
- 2 get dSYM file
1 get the unresolved crash log.
Connect iPhone to mac and download the crash log on iPhone from Xcode - > window - > devices view device logs.
2 get dSYM file
Each time the project is compiled, a dSYM file with the same name as APP is generated.
Different companies package in different ways. If the automation process is well done, there is usually a cluster. Find the corresponding dsym file and download it. The name is usually XXX app. dSYM
3 symbolization using xcode's symbolic graph tool
3.1 find symbolicatecrash
Open the terminal and enter the command:
find /Applications/Xcode.app -name symbolicatecrash -type f
Results of my mac:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/iOSSupport/Library/PrivateFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/Library/PrivateFrameworks/DVTFoundation.framework/symbolicatecrash /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/Library/PrivateFrameworks/DVTFoundation.framework/symbolicatecrash /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/DVTFoundation.framework/symbolicatecrash /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash
mac, mobile phone, simulator and other different versions. If it's an iPhone, choose the last one.
Open path:
/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/
Copy out the symbol cache.
3.2 place crash, dSYM and symbolic crash in the same folder
For example, I put it in
/Users/kqy/Documents/crashProblem1211
3.3 execute commands to generate symbolic files
./symbolicatecrash my.crash my1211.app.dSYM > result.crash
Where my Crash is the crash log; my1211.app.dSYM is a dSYM file.
All commands converge on one graph
4 frequently asked questions
4.1 Error: "DEVELOPER_DIR" is not defined at ./symbolicatecrash
The solution is to execute the command at the terminal:
export DEVELOPER_DIR="/Applications/XCode.app/Contents/Developer"
4.2 Warning: Unable to symbolicate from required binary: ~/Xcode/iOS DeviceSupport/13.6 (17G68) arm64e/Symbols/System/Library/Frameworks/CFNetwork.framework/CFNetwork
Because crash logs and The UUIDs of the dSYM file do not match.
For example, QA said that the crash was generated on Friday, so I downloaded the dSYM file corresponding to the package on Friday from the cluster.
However, the actual QA made a mistake. The crash is the package downloaded on Thursday, so the dSYM file corresponding to the package on Thursday should be used to ensure the consistency of UUIDs.
4.21 how to view uuid
uuid of dsym
View my1211 app. UUID of dsym file, enter the command at the terminal:
dwarfdump --uuid my1211.app.dSYM
uuid of crash log
Binary Images in the crash file. The string in the next line < > is the UUID of the crash file. At the end of the line is the name of the app and its path.