Skip to content

Commit dacb86a

Browse files
authored
Fix iOS setCustomKey wrong param order
Fixes #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.
1 parent e489ac1 commit dacb86a

File tree

1 file changed

+6
-6
lines changed
  • firebase-crashlytics/src/iosMain/kotlin/dev/gitlive/firebase/crashlytics

1 file changed

+6
-6
lines changed

firebase-crashlytics/src/iosMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,22 @@ public actual class FirebaseCrashlytics internal constructor(internal val ios: F
3737
}
3838
public actual fun didCrashOnPreviousExecution(): Boolean = ios.didCrashDuringPreviousExecution()
3939
public actual fun setCustomKey(key: String, value: String) {
40-
ios.setCustomValue(key, value)
40+
ios.setCustomValue(value, key)
4141
}
4242
public actual fun setCustomKey(key: String, value: Boolean) {
43-
ios.setCustomValue(key, value.toString())
43+
ios.setCustomValue(value.toString(), key)
4444
}
4545
public actual fun setCustomKey(key: String, value: Double) {
46-
ios.setCustomValue(key, value.toString())
46+
ios.setCustomValue(value.toString(), key)
4747
}
4848
public actual fun setCustomKey(key: String, value: Float) {
49-
ios.setCustomValue(key, value.toString())
49+
ios.setCustomValue(value.toString(), key)
5050
}
5151
public actual fun setCustomKey(key: String, value: Int) {
52-
ios.setCustomValue(key, value.toString())
52+
ios.setCustomValue(value.toString(), key)
5353
}
5454
public actual fun setCustomKey(key: String, value: Long) {
55-
ios.setCustomValue(key, value.toString())
55+
ios.setCustomValue(value.toString(), key)
5656
}
5757

5858
@Suppress("UNCHECKED_CAST")

0 commit comments

Comments
 (0)