Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i implement Firebase Crashlytics in a Kotlin multiplataform mobile?

If somebody did that before, can you tell me where did you put google-service.json? The android dependencies, did you put on them? In android module or in common module? On IOS nor do I know how to get started.

like image 320
Jhonata Ávila Avatar asked Nov 01 '25 12:11

Jhonata Ávila


1 Answers

Nothing changes, your google services files would go in your android module / ios module as usual (i.e. in the same way you'd store them if not using KMM) and all dependencies would be set up as usual also.

If you want to call anything on FirebaseCrashlytics.getInstance() from common code then you'd have two options:

  • expect/actual mechanism and import crashlytics into the andorid source set of common code
  • interface/impl with an interface in common code and an implementation in your android module & ios module
like image 145
enyciaa Avatar answered Nov 03 '25 05:11

enyciaa



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!