Files
honeyDueKMP/composeApp/src/jvmMain/kotlin/com/tt/honeyDue/analytics/PostHogAnalytics.jvm.kt
T
Trey T e4dc3ac30b Add PostHog exception capture for crash reporting
Android: uncaught exception handler sends $exception events with stack
trace to PostHog, flushes before delegating to default handler.
iOS: NSSetUncaughtExceptionHandler captures crashes via PostHogSDK,
avoids @MainActor deadlock by calling SDK directly.
Common: captureException() available for non-fatal catches app-wide.
Platform stubs for jvm/js/wasmJs.
2026-03-26 16:49:30 -05:00

40 lines
911 B
Kotlin

package com.tt.honeyDue.analytics
/**
* JVM/Desktop implementation of PostHog Analytics.
* Currently a no-op stub - PostHog doesn't have a native JVM SDK.
*/
actual object PostHogAnalytics {
actual fun initialize() {
// No-op for desktop
}
actual fun identify(userId: String, properties: Map<String, Any>?) {
// No-op for desktop
}
actual fun capture(event: String, properties: Map<String, Any>?) {
// No-op for desktop
}
actual fun captureException(throwable: Throwable, properties: Map<String, Any>?) {
// No-op for desktop
}
actual fun screen(screenName: String, properties: Map<String, Any>?) {
// No-op for desktop
}
actual fun reset() {
// No-op for desktop
}
actual fun flush() {
// No-op for desktop
}
actual fun setupExceptionHandler() {
// No-op for desktop
}
}