Kotlin Multiplatform SDK
Share link resolution and lifecycle analytics across Android, JVM, and iOS targets.
Choose this SDK when#
Use the Kotlin Multiplatform SDK when shared Kotlin code owns the LocusVia client and platform applications provide navigation around it.
Warning
Version 0.1.3 is source-only and is not published to Maven. JVM and iOS simulator compilation are proven; Android and signed-device proof remain pending.Choose another SDK when: only Android needs the client or your iOS application is Swift-first. The dedicated native SDKs have a smaller toolchain surface.
Before you start#
- A Kotlin Multiplatform project using a compatible Kotlin, Ktor, and serialization toolchain.
- A reviewed checkout of the LocusVia source package.
- Platform code that delivers the received URL and opens the resolved pathname.
Note
Use an environment-scoped public SDK key. Never embed a server, admin, or privileged credential in an app.1. Include the source build#
Add the reviewed SDK build to settings.gradle.kts and depend on it from commonMain. Keep the checkout revision fixed in CI.
// settings.gradle.kts
includeBuild("../locusvia/sdk/kotlin-multiplatform")
// shared/build.gradle.kts
commonMain.dependencies {
implementation("com.locusvia:locusvia-kotlin-multiplatform:0.1.3")
}4. Track lifecycle events deliberately#
Call lifecycle helpers at the real application boundary. first_open is an application signal, not proof of store installation.
locusVia.trackFirstOpen(
mapOf("eventId" to JsonPrimitive(stableEventId))
)
locusVia.trackRegistration(
mapOf("eventId" to JsonPrimitive(stableEventId))
)Verify the integration#
- Run JVM common tests and compile the iOS simulator target on the exact source revision.
- Compile the consuming Android and iOS applications, not only the SDK module.
- Open a verified public link on each supported target and confirm platform navigation receives the same pathname.
Warning
A successful build proves source compatibility only. Test a real link on the target browser or signed device before release.Troubleshoot by symptom#
Next steps#
Confirm your domain associations, then add conversion and revenue events only after link resolution works end to end.