[英]Firebase Crashlytics not reporting crashes after Fabric Migration
Recently we migrated our app from Fabric to Firebase Crashlytics and Firebase Analytics.最近,我们将应用程序从 Fabric 迁移到 Firebase Crashlytics 和 Firebase Analytics。 In android, everything works like a charm after following Google documentation.在 android 中,遵循 Google 文档后,一切都像魅力一样。 The problem is that in iOS we get no report on Firebase Crashlytics (works perfectly on Firebase Analytics)after following the same documentation.问题是在 iOS 中,我们没有得到关于 Firebase Crashlytics 的报告(在 Firebase Analytics 上完美运行)在遵循相同的文档之后。
Paths:路径:
Dev Google Service Info Plist: Supporting Files > Firebase > Dev > GoogleService-Info-Dev.plist
开发 Google 服务信息 Plist: Supporting Files > Firebase > Dev > GoogleService-Info-Dev.plist
Prod Google Service Info Plist: Supporting Files > Firebase > Prod > GoogleService-Info-Prod.plist
Prod Google 服务信息 Plist: Supporting Files > Firebase > Prod > GoogleService-Info-Prod.plist
Empty Plist: Supporting Files > GoogleService-Info.plist
空 Plist: Supporting Files > GoogleService-Info.plist
Build Phases:构建阶段:
Run Script (GoogleService-Info.plist assignment) :运行脚本(GoogleService-Info.plist 分配) :
if [ "${CONFIGURATION}" = "Release" ]; then
GOOGLE_SERVICE_INFO_PLIST_FROM="${PROJECT_DIR}/Supporting Files/Firebase/Prod/GoogleService-Info-Prod.plist"
else
GOOGLE_SERVICE_INFO_PLIST_FROM="${PROJECT_DIR}/Supporting Files/Firebase/Dev/GoogleService-Info-Dev.plist"
fi
GOOGLE_SERVICE_INFO_PLIST_TO="${PROJECT_DIR}/Supporting Files/GoogleService-Info.plist"
cp "${GOOGLE_SERVICE_INFO_PLIST_FROM}" "${GOOGLE_SERVICE_INFO_PLIST_TO}"
Run Script (Firebase Crashlytics Run) :运行脚本(Firebase Crashlytics 运行) :
# Run Firebase Crashlytics
"${PODS_ROOT}/FirebaseCrashlytics/run" -gsp "${PROJECT_DIR}/Supporting\ Files/GoogleService-Info.plist"
AppDelegate:应用委托:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Set Google -Info.plist for enviroment
let filePath = Bundle.main.path(forResource: ULima.getInfoPlist(buildType: ULima.buildType), ofType: "plist")
if let fileopts = FirebaseOptions(contentsOfFile: filePath!) {
// Use Firebase library to configure APIs and Crashlytics
FirebaseApp.configure(options: fileopts)
}
[...]
}
Crashlytics Console: Crashlytics 控制台:
What I already tried:我已经尝试过的:
"${PODS_ROOT}/FirebaseCrashlytics/run"
只运行"${PODS_ROOT}/FirebaseCrashlytics/run"
Crashlytics.crashlytics().didCrashDuringPreviousExecution()
检查Crashlytics.crashlytics().didCrashDuringPreviousExecution()
AppDelegate
:将此添加到AppDelegate
: Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(false)
Crashlytics.crashlytics().checkForUnsentReports { _ in
Crashlytics.crashlytics().sendUnsentReports()
}
The run script doesn't look fine to me.运行脚本对我来说看起来不太好。 There should be one or two separated commands:应该有一个或两个单独的命令:
"${PODS_ROOT}/FirebaseCrashlytics/run"
(see docs )运行(开始)Firebase Crashlytics: "${PODS_ROOT}/FirebaseCrashlytics/run"
(参见 文档)So I suggest you to edit your Firebase Crashlytics Run Script just to Run Crashlytics (without uploading any dSYM file).所以我建议你编辑你的 Firebase Crashlytics运行脚本只是为了运行 Crashlytics(不上传任何 dSYM 文件)。 If it helps and you can see a crash in console, than you can check if dSYM file is missing (so another script for uploading dSYM will be needed).如果它有帮助并且您可以在控制台中看到崩溃,那么您可以检查 dSYM 文件是否丢失(因此需要另一个用于上传 dSYM 的脚本)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.