我想尝试和象征我的iPhone应用程序的崩溃报告。
我从iTunes Connect上找到了崩溃报告。我有提交给App Store的应用程序二进制文件,我有作为构建的一部分生成的dSYM文件。
我将所有这些文件放在一个目录中,该目录以spotlight为索引。
现在该做什么?
我试着引用:
symbolicatecrash crashreport.crash myApp.app.dSYM
它只输出与崩溃报告开始时相同的文本,没有符号。
我做错什么了吗?
我想尝试和象征我的iPhone应用程序的崩溃报告。
我从iTunes Connect上找到了崩溃报告。我有提交给App Store的应用程序二进制文件,我有作为构建的一部分生成的dSYM文件。
我将所有这些文件放在一个目录中,该目录以spotlight为索引。
现在该做什么?
我试着引用:
symbolicatecrash crashreport.crash myApp.app.dSYM
它只输出与崩溃报告开始时相同的文本,没有符号。
我做错什么了吗?
当前回答
为了表示崩溃,Spotlight必须能够找到与您提交给Apple的二进制文件同时生成的. dsym文件。由于它包含符号信息,如果它不可用,那么您就不走运了。
其他回答
使用XCode自动生成崩溃报告的步骤:
为xcode 9更新
将任何iOS设备连接到你的Mac(是的,物理设备,是的,我知道这很愚蠢) 从“窗口”菜单中选择“设备” 在左侧单击设备,在右侧单击“查看设备日志” 等待。可能要过一分钟才会出现。也许按Command-A键然后删除可以加快速度。 关键的未记录步骤:将你从iTunesConnect中获得的崩溃报告从.txt扩展名重命名为.crash扩展名 将坠机报告拖到左侧的区域
然后Xcode会将崩溃报告符号化并显示结果。
来源:https://developer.apple.com/library/ios/technotes/tn2151/_index.html
为了表示崩溃,Spotlight必须能够找到与您提交给Apple的二进制文件同时生成的. dsym文件。由于它包含符号信息,如果它不可用,那么您就不走运了。
我更喜欢一个脚本,将象征我的所有崩溃日志。
先决条件
创建一个文件夹,放4样东西:
symbolicatecrash perl script - there are many SO answers that tells it's location The archive of the build that match the crashes (from Xcode Organizer. simple as Show in Finder and copy) [I don't sure this is necessery] All the xccrashpoint packages - (from Xcode Organizer. Show in Finder, you may copy all the packages in the directory, or the single xccrashpoint you would like to symbolicate) Add that short script to the directory: #!/bin/sh echo "cleaning old crashes from directory" rm -P *.crash rm -P *.xccrashpoint rm -r allCrashes echo "removed!" echo "" echo "--- START ---" echo "" mkdir allCrashes mkdir symboledCrashes find `ls -d *.xccrashpoint` -name "*.crash" -print -exec cp {} allCrashes/ \; cd allCrashes for crash in *.crash; do ../symbolicatecrash $crash > ../symboledCrashes/V$crash done cd .. echo "" echo "--- DONE ---" echo ""
这个脚本
运行脚本时,将得到两个目录。
allCrashes -所有来自所有xccrashpoint的所有崩溃都会在那里。 symboledCrashes -相同的崩溃,但现在有了所有的符号。 你不需要在运行脚本之前从旧的崩溃中清理目录。它会自动清洗。好运!
在运行symbolicate crash之前,我还将dsym、应用程序包和崩溃日志放在同一个目录中
然后我使用.profile中定义的这个函数来简化运行symbolicatcrash:
function desym
{
/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash -A -v $1 | more
}
上面的论点可能对你有帮助。
您可以检查,以确保spotlight“看到”您的dysm文件通过运行命令:
mdfind 'com_apple_xcode_dsym_uuids = *'
在目录中查找您拥有的dsym。
注意:在最新的Xcode中,不再有Developer目录。你可以在这里找到这个实用程序:
/应用程序/ xcode /内容/ SharedFrameworks / DTDeviceKitBase.framework /更离子/ /资源/ symbolicatecrash
我们使用谷歌Crashlytics来监督崩溃日志,感觉使用起来非常及时和方便。
文档链接: https://docs.fabric.io/apple/crashlytics/missing-dsyms.html#missing-dsyms
All about Missing dSYMs Fabric includes a tool to automatically upload your project’s dSYM. The tool is executed through the /run script, which is added to your Run Script Build Phase during the onboarding process. There can be certain situations however, when dSYM uploads fail because of unique project configurations or if you’re using Bitcode in your app. When an upload fails, Crashlytics isn’t able to symbolicate and display crashes, and a “Missing dSYM” alert will appear on your Fabric dashboard.
可以按照下面列出的步骤手动上传缺失的dsym。
注意: 作为自动化dSYM上传工具的替代方案,Fabric提供了一个命令行工具(upload-symbols),可以手动配置该工具,使其作为项目构建过程的一部分运行。有关配置说明,请参阅下面的上传符号部分。
...