GitLiveApp / firebase-kotlin-sdk

A Kotlin-first SDK for Firebase
https://gitliveapp.github.io/firebase-kotlin-sdk/
Apache License 2.0
979 stars 148 forks source link

Crashlytics - iOS - setCustomKey - wrong parameters order #520

Open alaegin opened 3 weeks ago

alaegin commented 3 weeks ago

Hello!

I started using setCustomKey in the Crashlytics library. Unfortunately, the current implementation has some serious issue: the order of parameters in setCustomKey is wrong.

Here is the code from my app:

.distinctUntilChanged()
.onEach { balance ->
    logger.i("Setting balance in Crashlytics: $balance")
    Firebase.crashlytics.setCustomKey("balance", balance)
}

Here is the result in Crashlytics report: image

Here is the Firebase documentation: image

It seems like the current implementation was done wrong because of the difference between Android (key, value) and iOS (value, key) Firebase libraries.

nbransby commented 3 weeks ago

Sounds like you know how to fix it! Any chance of a PR?

alaegin commented 3 weeks ago

@nbransby Hah, I'll take a look