e4dc3ac30b
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.
40 lines
911 B
Kotlin
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
|
|
}
|
|
}
|