Tracker
The main entry point for recording analytics events.
Obtain an instance via the Autograph builder function and provide it to your UI (e.g. through AutographProvider from the autograph-compose module).
track, screen, and identify are fire-and-forget and safe to call from any thread, including the main thread: stamping and its disk persistence run on an internal serial dispatcher, so they never block the caller. Events are still stamped in call order.
Properties are declared Map<String, JsonElement>, not JsonObject, and must stay that way. JsonObject is a subtype of that map, and Kotlin/Native hands a Swift dictionary into a Map subtype unchecked — the call then dies with SIGSEGV instead of raising anything catchable (#193). Narrow it with asJsonObject inside the implementation if you need a JsonObject.
Functions
Drains, then releases the resources held by this tracker (its internal stamping/delivery coroutine scope). Call when a tracker is being discarded and replaced, such as recreating it on logout — not needed for a tracker that lives for the app's lifetime.
Signals that the app moved to the background. See notifyForeground.
Signals that the app moved to the foreground. Drives session-timeout bookkeeping. Wired automatically when using AutographProvider from autograph-compose.