diff --git a/CHANGELOG.md b/CHANGELOG.md index a97931b1..97435c1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 1.9.0 (unreleased) +- Updated user agent string formats to allow viewing version distributions in the new PowerSync dashboard. - Sync options: `newClientImplementation` is now the default. - Make `androidx.sqlite:sqlite-bundled` an API dependency of `:core` to avoid toolchain warnings. diff --git a/common/src/androidMain/kotlin/com/powersync/sync/UserAgent.android.kt b/common/src/androidMain/kotlin/com/powersync/sync/UserAgent.android.kt index 19502709..34c194b9 100644 --- a/common/src/androidMain/kotlin/com/powersync/sync/UserAgent.android.kt +++ b/common/src/androidMain/kotlin/com/powersync/sync/UserAgent.android.kt @@ -3,4 +3,4 @@ package com.powersync.sync import android.os.Build import com.powersync.build.LIBRARY_VERSION -internal actual fun userAgent(): String = "PowerSync Kotlin SDK v$LIBRARY_VERSION (Android ${Build.VERSION.SDK_INT})" +internal actual fun userAgent(): String = "powersync-kotlin/$LIBRARY_VERSION android/${Build.VERSION.SDK_INT}" diff --git a/common/src/jvmMain/kotlin/com/powersync/sync/UserAgent.jvm.kt b/common/src/jvmMain/kotlin/com/powersync/sync/UserAgent.jvm.kt index 704f9570..dc63a538 100644 --- a/common/src/jvmMain/kotlin/com/powersync/sync/UserAgent.jvm.kt +++ b/common/src/jvmMain/kotlin/com/powersync/sync/UserAgent.jvm.kt @@ -7,5 +7,5 @@ internal actual fun userAgent(): String { val osVersion = System.getProperty("os.version") ?: "" val java = System.getProperty("java.vendor.version") ?: System.getProperty("java.runtime.version") ?: "unknown" - return "PowerSync Kotlin SDK v${LIBRARY_VERSION} (running Java $java on $os $osVersion)" + return "powersync-kotlin/${LIBRARY_VERSION} Java/$java $os/$osVersion" } diff --git a/common/src/nativeMain/kotlin/com/powersync/sync/UserAgent.native.kt b/common/src/nativeMain/kotlin/com/powersync/sync/UserAgent.native.kt index eff15b7f..1869fbed 100644 --- a/common/src/nativeMain/kotlin/com/powersync/sync/UserAgent.native.kt +++ b/common/src/nativeMain/kotlin/com/powersync/sync/UserAgent.native.kt @@ -4,5 +4,4 @@ import com.powersync.build.LIBRARY_VERSION import kotlin.experimental.ExperimentalNativeApi @OptIn(ExperimentalNativeApi::class) -internal actual fun userAgent(): String = - "PowerSync Kotlin SDK v$LIBRARY_VERSION (running on ${Platform.cpuArchitecture.name} ${Platform.osFamily.name})" +internal actual fun userAgent(): String = "powersync-kotlin/v$LIBRARY_VERSION ${Platform.cpuArchitecture.name}/${Platform.osFamily.name}"