Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase crashlytics is not initialized in iOS

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: enter image description here

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

like image 713
HariKarthick Avatar asked Dec 06 '25 08:12

HariKarthick


1 Answers

For some reason following the Firebase docs did not work for me as I had to do a few additional things for the "Add the SDK" loading screen to disappear on the Firebase portal and show me the crashes.

In addition to what the Firebase docs say, I did the following in addition with the help of this answer

  1. Go to Build Settings -> Debug Information Format -> Set all of them to DWARF with dSYM file
  2. Go to Build Phases -> Add an additional run script and input the following
${PODS_ROOT}/FirebaseCrashlytics/upload-symbols -gsp ${PROJECT_DIR}/Your_path/GoogleService-Info.plist -p ios ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}

Remember to replace Your_path appropriately for your project

  1. Stage a crash in your application as described here

  2. Disconnect your device / simulator from the debugger AKA launch it on your own rather than running it from XCode and then perform the crash

  3. I was now able to see the above loading disappear and I could see my crash statistics instead

like image 185
Shawn Frank Avatar answered Dec 07 '25 20:12

Shawn Frank



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!