问题
In our project we were used the fabric for reporting crash, after that we have migrated the fabric with firebase and not removed the fabric due to the firebase was in beta. Right now we are trying to remove the fabric and crashlytics dependencies in the entire code:
#pod 'Fabric', '1.10.2'
#pod 'Crashlytics', '3.14.0'
And used the below dependencies for Firebase Crashlytics.
pod 'FirebaseCrashlytics', '4.5.0'
pod 'FirebaseAnalytics', '6.8.0'
pod 'FirebaseCore', '6.10.1'
pod 'FirebaseMessaging', '4.6.2'
For initializing the crashlytics I have added the script in the build phases:
"${PODS_ROOT}/FirebaseCrashlytics/run"
Input Files:
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME} $(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
Already we have placed the crash in staging/production environment during fabric integration, so when migrating the firebase all the crashes get configured. But when I place the new crash, the crash not added in the crashlytics report in staging/production environment.
When I run the app and crash the app in the development environment crashlytics is not get configured.
For development:
Ref:https://firebase.google.com/docs/crashlytics/get-started?authuser=0
Note : I am able to place the crash using fabric: $
{PODS_ROOT}/Fabric/run API_KEY BUILD_SECRET
回答1:
As mentioned in Firebase Docs, When you are running an app using Xcode Simulator, an initial instance of your app which includes a debugger that interferes with Crashlytics also created. With a debugger, Crashlytics can't see crashes. So you have to detach a debugger and run the app directly from a simulator or device.
来源:https://stackoverflow.com/questions/63701913/firebase-crashlytics-is-not-initialized-in-ios