Categories
Crashlytics Firebase Martech SDKs

Martech SDKs : Part 2 : Firebase Crashlytics

Quickly: Crashlytics helps manage crashes and issues with builds in a pretty UI, and while some of this functionality exists in GA, this is considered the main crash reporting tool for Firebase.

Let’s jump in.

Things To Gather

Adding Crashlytics

This one is going to be super quick. Let’s open the podfile again.

open Podfile

And add the pod.

pod 'Firebase/Crashlytics'

And, let’s build and install!

pod install
install Crashlytics

Remember to open up the .xcworkspace file in Xcode and let’s finish the fight.

This is a bit tricky, but with screenshots I hope I can clear it up a bit. We need to add a new Run Script to the build phase of the your app (all that jazz that happens when you build and run your current scheme).

Learn more about the Build Process

Project > Target > Build Phases > Run Script

Add a New Run Script Phase, and include these two Input Files

${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

“What does this do?”

Basically, the signature of your app/dsym changes every time you modify the build and these scripts will compile it and send it to Firebase automagically so you won’t have to keep current…

…or whatever.

Lastly, just import Crashlytics to your controllers using import FirebaseCrashlytics and you should be up and running! If you want to ever debug/simulate a crash, simply add fatalError() in your viewWillAppear or other class to cause a crash.

Thoughts

That was pretty easy and straightforward, except for the Run Scripts. That took me a while to figure out.

One big call out I found is (and maybe its an edge case for just me) when I deleted my sample app, I seem to have lost the .dsym link to Crashlytics and can’t figure out how to relink so I can see crashes again. Any thoughts?

Thanks

Next up, A/B Testing In-App Messaging!


Edits

Changed my mind on going straight to AB Testing since that is going to require some changes to the app (we need something to test against!) so I just skipped to In-App Messaging.

Leave a Reply

Your email address will not be published. Required fields are marked *