firebase-kotlin-sdk icon indicating copy to clipboard operation
firebase-kotlin-sdk copied to clipboard

Crashlytics - iOS - setCustomKey - wrong parameters order

Open alaegin opened this issue 1 year ago • 2 comments
trafficstars

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.

alaegin avatar Jun 02 '24 15:06 alaegin

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

nbransby avatar Jun 03 '24 11:06 nbransby

@nbransby Hah, I'll take a look

alaegin avatar Jun 03 '24 12:06 alaegin

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

kaidotarma avatar Oct 13 '24 14:10 kaidotarma