Reputation: 140
Recently we migrated our app from Fabric to Firebase Crashlytics and Firebase Analytics. In android, everything works like a charm after following Google documentation. The problem is that in iOS we get no report on Firebase Crashlytics (works perfectly on Firebase Analytics)after following the same documentation.
Paths:
Dev Google Service Info Plist:
Supporting Files > Firebase > Dev > GoogleService-Info-Dev.plist
Prod Google Service Info Plist:
Supporting Files > Firebase > Prod > GoogleService-Info-Prod.plist
Empty Plist:
Supporting Files > GoogleService-Info.plist
Build Phases:
Run Script (GoogleService-Info.plist assignment):
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):
# 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:
What I already tried:
"${PODS_ROOT}/FirebaseCrashlytics/run"
Crashlytics.crashlytics().didCrashDuringPreviousExecution()
AppDelegate
: Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(false)
Crashlytics.crashlytics().checkForUnsentReports { _ in
Crashlytics.crashlytics().sendUnsentReports()
}
Upvotes: 0
Views: 1804
Reputation: 131
The run script doesn't look fine to me. There should be one or two separated commands:
"${PODS_ROOT}/FirebaseCrashlytics/run"
(see docs)So I suggest you to edit your Firebase Crashlytics Run Script just to Run Crashlytics (without uploading any dSYM file). 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).
Upvotes: 0