[英]Firebase Crashlytics: Missing dsym files
We've moved from fabric.io to Firebase and now the dsym files are always missing.我们已经从 fabric.io 移动到 Firebase,现在 dsym 文件总是丢失。 This manual tries to help but I don't really understand it:
本手册试图提供帮助,但我不太明白:
Manual: https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?authuser=0&platform=ios手册: https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?authuser=0&platform=ios
So which line do I exactly need to implement in the build phases so it does it automatic?那么我究竟需要在构建阶段实现哪一行以便它自动执行? This one?
这个? find dSYM_directory -name "*.dSYM" |
查找 dSYM_directory -name "*.dSYM" | xargs -I {} $PODS_ROOT/Fabric/upload-symbols -gsp /path/to/GoogleService-Info.plist -p platform {}
xargs -I {} $PODS_ROOT/Fabric/upload-symbols -gsp /path/to/GoogleService-Info.plist -p platform {}
But then my other questions: How can I find my dsym_directory?但是我的其他问题是:如何找到我的 dsym_directory? And I mean this is different for every build isn't it?
我的意思是每个版本都不同,不是吗? And it also says:
它还说:
Important: If you're working with an app that you previously linked from Fabric to Firebase Crashlytics, pass in your Fabric API Key to run the upload symbols script.
重要提示:如果您正在使用之前从 Fabric 链接到 Firebase Crashlytics 的应用程序,请传入您的 Fabric API 密钥以运行上传符号脚本。 That is, in the following options to run the script, use -a fabric-api-key instead of -gsp path/to/GoogleService-Info.plist.
也就是说,在以下运行脚本的选项中,使用 -a fabric-api-key 而不是 -gsp path/to/GoogleService-Info.plist。
So does this mean I can use the variable fabric-api-key or do I need to replace it exactly with my key?那么这是否意味着我可以使用变量 fabric-api-key 或者我需要用我的密钥完全替换它? Can someone just help me and give the exact line I have to insert into the build phases?
有人可以帮助我并给出我必须插入构建阶段的确切行吗?
28/May/2020 28/五月/2020
For me i work on this steps until dsym problem solved with me.
对我来说,我一直在执行这些步骤,直到 dsym 问题与我一起解决。
In the first Add Firebase Crashlytics to your app:在第一个将 Firebase Crashlytics 添加到您的应用程序中:
Open the podfile you created for your Firebase project and add the FirebaseCrashlytics pod打开您为 Firebase 项目创建的 podfile 并添加 FirebaseCrashlytics pod
pod 'Firebase/Crashlytics'
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
pod 'Firebase/Analytics'
Then apply : pod install'然后申请:pod install'
Create tow scripts as shown in image :创建如图所示的两个脚本:
In the first script write the next command:在第一个脚本中编写下一个命令:
"${PODS_ROOT}/FirebaseCrashlytics/run" “${PODS_ROOT}/FirebaseCrashlytics/运行”
and in inpute files add the tow input files:并在输入文件中添加两个输入文件:
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
In the second script write the next command:在第二个脚本中编写下一个命令:
"find ${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" | xargs -I \{\} "$PODS_ROOT/Fabric/upload-symbols" -gsp "$PODS_ROOT/../GoogleService-Info.plist" -p ios \{\}
if dSYM didn't work with you when you need to upload dSYM files by the terminal for first time at least.如果您至少第一次需要通过终端上传 dSYM 文件时 dSYM 无法与您合作。
The following steps explain how to upload a dSYM files to Firebase:以下步骤说明了如何将 dSYM 文件上传到 Firebase:
/ path-to-your-project /Pods/FirebaseCrashlytics/upload-symbols -gsp / path-to-GoogleService-Info.plist /GoogleService-Info.plist -p ios / path-to-appDsyms-folder /appDsyms
/ path-to-your-project /Pods/FirebaseCrashlytics/upload-symbols -gsp / path-to-GoogleService-Info.plist /GoogleService-Info.plist -p ios / path-to-appDsyms-folder /appDsyms
I used find ${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" before the script to find the dsyms.我在脚本之前使用 find ${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" 来查找 dsyms。
"find ${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" | xargs -I \{\} "$PODS_ROOT/Fabric/upload-symbols" -gsp "$PODS_ROOT/../GoogleService-Info.plist" -p ios \{\}
For those who didn't find Activity in AppStoreConnect.对于那些没有在 AppStoreConnect 中找到 Activity 的人。
Download the .dSYMs file manually from AppStoreConnect:从 AppStoreConnect 手动下载 .dSYMs 文件:
Alternative script to make sure the dsyns are uploaded correctly确保正确上传 dsyn 的替代脚本
set -e
echo "info: Exec Upload dSYM"
#Path for google service .plist
GOOGLE_SERVICE_INFO_PLIST="${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}/GoogleService-Info.plist"
#Path for DSYM directory
DSYM_PATH="$DWARF_DSYM_FOLDER_PATH/dddd/$DWARF_DSYM_FILE_NAME"
#Firebase command script
CMD=""
if [[ ${PODS_ROOT} ]]; then
echo "info: Exec FirebaseCrashlytics Run from Pods"
CMD="$PODS_ROOT/FirebaseCrashlytics/upload-symbols"
else
echo "info: Exec FirebaseCrashlytics Run from framework"
CMD="$PROJECT_DIR/FirebaseCrashlytics.framework/upload-symbols"
fi
echo "info: Checking if .plist exists"
if [ -f "$GOOGLE_SERVICE_INFO_PLIST" ]; then
echo "info: $GOOGLE_SERVICE_INFO_PLIST exists."
else
echo "ERROR: $GOOGLE_SERVICE_INFO_PLIST does not exist."
exit 1
fi
echo "info: Checking if .dSYM"
if [ -d "$DSYM_PATH" ]; then
echo "info: $DSYM_PATH exists."
else
echo "ERROR: $DSYM_PATH does not exist."
echo "info: try fallback"
DSYM_PATH=` find "${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" | xargs `
if [ -d "$DSYM_PATH" ]; then
echo "info: $DSYM_PATH exists."
else
echo "ERROR: $DSYM_PATH does not exist."
exit 1
fi
fi
echo "info: Check if upload-symbols script exists"
if [ -f "$CMD" ]; then
echo "$CMD exists."
else
echo "ERROR: $CMD does not exist."
exit 1
fi
echo "info: Starting command upload-symbols"
"${CMD}" -gsp "$GOOGLE_SERVICE_INFO_PLIST" -p ios "$DSYM_PATH" > /dev/null 2>&1 &
echo "info: Symbol uploading will proceed in the background."
echo "info: remove '> /dev/null 2>&1 &' to test in the main thread and see if there are any errors, or open console and filter with 'upload-symbols'"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.