From dacb86ae242ee46f2af7dabfe9cc68f849a5c4d9 Mon Sep 17 00:00:00 2001 From: Kaido Tarma Date: Sun, 13 Oct 2024 17:27:06 +0300 Subject: [PATCH] Fix iOS setCustomKey wrong param order Fixes https://github.com/GitLiveApp/firebase-kotlin-sdk/issues/520 According to the docs: https://firebase.google.com/docs/crashlytics/customize-crash-reports?platform=ios#add-keys the order of the parameters is: value, key setCustomKeysAndValues still expects to order of the map elements to be key, value - so no changes there. --- .../dev/gitlive/firebase/crashlytics/crashlytics.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/firebase-crashlytics/src/iosMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt b/firebase-crashlytics/src/iosMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt index 6c6d16bec..5445ceb6e 100644 --- a/firebase-crashlytics/src/iosMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt +++ b/firebase-crashlytics/src/iosMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt @@ -37,22 +37,22 @@ public actual class FirebaseCrashlytics internal constructor(internal val ios: F } public actual fun didCrashOnPreviousExecution(): Boolean = ios.didCrashDuringPreviousExecution() public actual fun setCustomKey(key: String, value: String) { - ios.setCustomValue(key, value) + ios.setCustomValue(value, key) } public actual fun setCustomKey(key: String, value: Boolean) { - ios.setCustomValue(key, value.toString()) + ios.setCustomValue(value.toString(), key) } public actual fun setCustomKey(key: String, value: Double) { - ios.setCustomValue(key, value.toString()) + ios.setCustomValue(value.toString(), key) } public actual fun setCustomKey(key: String, value: Float) { - ios.setCustomValue(key, value.toString()) + ios.setCustomValue(value.toString(), key) } public actual fun setCustomKey(key: String, value: Int) { - ios.setCustomValue(key, value.toString()) + ios.setCustomValue(value.toString(), key) } public actual fun setCustomKey(key: String, value: Long) { - ios.setCustomValue(key, value.toString()) + ios.setCustomValue(value.toString(), key) } @Suppress("UNCHECKED_CAST")