xcode 为什么 Crashlytics 每次都要求丢失 DSYM 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/51440225/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why Crashlytics is asking for missing DSYM file every time?
提问by Anup Gupta
I am using Crashlytics in my app everything working fine. even Crashlytics is also working good.
我在我的应用程序中使用 Crashlytics 一切正常。甚至 Crashlytics 也运行良好。
But the problem is that whenever I am creating a new buildfor our app its again showing missing DSYM File upload new.
但问题是,每当我为我们的应用程序创建新版本时,它都会再次显示缺少 DSYM 文件上传新文件。
Is there any solution for this?
有什么解决办法吗?
In fabric Document, I found this. but I did not understand this.
在fabric Document 中,我找到了这个。但我不明白这一点。
can anyone explain to me how to resolve this issue?
谁能向我解释如何解决这个问题?
https://docs.fabric.io/apple/crashlytics/advanced-setup.html
https://docs.fabric.io/apple/crashlytics/advanced-setup.html
采纳答案by user3476114
TL;DR
TL; 博士
Everytime you recompile your project after adding a line of code, the dSYM changes because the address of your lines of code in the resulting binary is not the same.
每次在添加一行代码后重新编译项目时,dSYM 都会发生变化,因为生成的二进制文件中的代码行地址不同。
You can look at Fabric docs about uploading dsymto automatically upload your dSYM by adding a build phase or use the Fabric pod instead of just Crashlytics which apparently adds a build phase automatically like @ekscrypto said.
您可以查看有关上传 dsym以通过添加构建阶段自动上传 dSYM 的Fabric 文档,或者使用 Fabric pod 而不仅仅是 Crashlytics,后者显然会像 @ekscrypto 所说的那样自动添加构建阶段。
If you still want to do this manually, open your xcarchive where you can find your dSYMs and upload them to crashlytics
如果您仍然想手动执行此操作,请打开您的 xcarchive,您可以在其中找到您的 dSYM 并将它们上传到 crashlytics
More details
更多细节
dSYM is short for debug SYMbols. This helps crashlytics resolve the crash logs it receives and helps display detailed information about the crashes/bugs that can occur.
dSYM 是调试符号的缩写。这有助于 crashlytics 解决它收到的崩溃日志,并有助于显示有关可能发生的崩溃/错误的详细信息。
When you archive your app, you're left with *.xcarchive "file" which really is a folder that you can browse. Inside this xcarchive, you should have a dSYM folder where your dSYMs are.
当您归档您的应用程序时,您会留下 *.xcarchive “文件”,它实际上是一个您可以浏览的文件夹。在此 xcarchive 中,您应该有一个 dSYM 文件夹,其中包含 dSYM。
To view it, first open organizer window in XCode (Window > Organizer or cmd+shift+6), right click on the last archive and click "Show in Finder". On the Finder window that opens, right click the last xcarchive for your app and click on show contents (sorry the picture is in french)
要查看它,首先在 XCode 中打开管理器窗口(窗口 > 管理器或 cmd+shift+6),右键单击最后一个存档并单击“在 Finder 中显示”。在打开的 Finder 窗口中,右键单击您应用的最后一个 xcarchive,然后单击显示内容(抱歉图片是法语)
This takes you inside your xcarchive where you can see the dSYMs for your app
这将带您进入 xcarchive,您可以在其中查看应用的 dSYM
Uploading this to crashlytics should solve your issue
将此上传到 crashlytics 应该可以解决您的问题
回答by elfenlaid
We've recently encountered the same issue. Ended up with a bit customized version of an uploading script.
我们最近遇到了同样的问题。最终得到了一个上传脚本的定制版本。
if [[ "${CONFIGURATION}" = "Release" ]] || [[ "${CONFIGURATION}" = "Adhoc" ]]; then
echo "Uploading dSYMs.."
find "${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" | xargs -I \{\} "${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${SRCROOT}/GoogleService-Info.plist" -p ios \{\}
else
echo "Skip dSYMs upload"
fi
Note quoted paths and skipped dSYM uploads in a Debug configuration. Though it probably won't matter most of the time, as dSYMS are switched off in the Debug configuration anyway.
注意在调试配置中引用的路径和跳过的 dSYM 上传。尽管在大多数情况下这可能无关紧要,因为无论如何 dSYMS 在 Debug 配置中都是关闭的。
Also the purpose of find
here is to help upload dynamic frameworks' dSYM files. E.g. OS third-party libraries, project frameworks, etc. Otherwise, they won't be symbolicated. Though still presented in stack traces.
find
这里的目的也是帮助上传动态框架的 dSYM 文件。例如操作系统第三方库、项目框架等。否则,它们将不会被符号化。虽然仍然出现在堆栈跟踪中。
回答by Lucky Mehndiratta
Simple Steps Follow 1 Go to archive and right click on the latest version in which you want to get crash report on firebase 2 see the dsyms folder 3 create the Zip file of dsyms folder 4 finally upload that zip file into the firebase console
遵循的简单步骤 1 转到存档并右键单击要在其中获取有关 firebase 崩溃报告的最新版本 2 查看 dsyms 文件夹 3 创建 dsyms 文件夹的 Zip 文件 4 最后将该 zip 文件上传到 firebase 控制台
回答by Mahgol Fa
回答by CoderPug
This error means that some dSYM files are missing. The recommended approach is to constantly upload dSYM files to Crashlytics.
此错误意味着某些 dSYM 文件丢失。推荐的方法是不断将 dSYM 文件上传到 Crashlytics。
Now that Crashlyticsis integrated in Firebase, the documentation has slightly changed: https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk
现在Crashlytics集成在Firebase 中,文档略有变化:https: //firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk
- Integrate Crashlytics :
pod 'Firebase/Crashlytics'
- Add a Run Script Phase :
find "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}" -name "*.dSYM" | xargs -I \{\} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp ${SRCROOT}/GoogleService-Info.plist -p ios \{\}
- 集成 Crashlytics:
pod 'Firebase/Crashlytics'
- 添加运行脚本阶段:
find "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}" -name "*.dSYM" | xargs -I \{\} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp ${SRCROOT}/GoogleService-Info.plist -p ios \{\}
In case you don't want to upload dSYM files each time you debug build your app : https://support.crashlytics.com/knowledgebase/articles/118559-can-i-make-the-dsym-uploading-only-on-release-buil
如果您不想在每次调试构建应用程序时上传 dSYM 文件:https: //support.crashlytics.com/knowledgebase/articles/118559-can-i-make-the-dsym-uploading-only-on -发布-构建
回答by ekscrypto
Make sure you integrate the new 'Fabric' framework and not only the Crashlytics framework. When you do so, you will end up with a new script in the Build Phase of your project.
确保您集成了新的“Fabric”框架,而不仅仅是 Crashlytics 框架。执行此操作后,您将在项目的构建阶段获得一个新脚本。
This script will automatically locate your dSYM and upload it along with your build to the Fabric.io/Crashlytics system.
此脚本将自动定位您的 dSYM 并将其与您的构建一起上传到 Fabric.io/Crashlytics 系统。
回答by pegpeg
And they changed again:
他们又变了:
find dSYM_directory -name "*.dSYM" | xargs -I \{\} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp ${SRCROOT}/GoogleService-Info.plist -p ios \{\}
Check here: https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk
在这里查看:https: //firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk