Skip to content

Commit

Permalink
Fix iOS setCustomKey wrong param order
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kaidotarma authored Oct 13, 2024
1 parent e489ac1 commit dacb86a
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit dacb86a

Please sign in to comment.