GitLiveApp / firebase-kotlin-sdk

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

Crashlytics - iOS - setCustomKey - wrong parameters order #520

Closed alaegin closed 1 month ago

alaegin commented 5 months 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 5 months ago

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

alaegin commented 5 months ago

@nbransby Hah, I'll take a look

kaidotarma commented 1 month ago

Noticed the same issue. Here is the fix PR: https://github.com/GitLiveApp/firebase-kotlin-sdk/pull/646