Repository navigation
feat(bindings): add C12 telemetry lifecycle stubs to consumer-check apps - #750
Merged
Merged
Conversation
Ankush523
force-pushed
the
feat/consumer-check-telemetry-lifecycle
branch
from
November 16, 2026 22:12
dcb3139 to
e93e65a
Compare
1 of 2 tasks
bahdotsh
force-pushed
the
feat/consumer-check-telemetry-lifecycle
branch
4 times, most recently
from
November 17, 2026 07:29
63a1837 to
361aa40
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
bahdotsh
force-pushed
the
feat/consumer-check-telemetry-lifecycle
branch
from
November 17, 2026 09:41
361aa40 to
2556758
Compare
… apps The Swift and Kotlin stubs called notifyAppState(background) then notifyAppState(active) back to back. Copied as telemetry.md told integrators to, that rotates a session on the spot and closes none when the app actually backgrounds. Both now carry a TelemetryLifecycleForwarder that mirrors the React Native module, which is not in either native package: - Swift: UIApplication background/foreground notifications, the background edge and a three-second flush inside a background task, both edges on one serial queue, enable seeded from applicationState. - Kotlin: an Application.ActivityLifecycleCallbacks watcher registered in Application.onCreate, started activities held by identity, the background edge gated on isChangingConfigurations, every exception from notifyAppState caught, enable seeded from the watcher. The config helpers take the api key and app version instead of hard-coding an empty key the engine refuses. Also: drop the Kotlin consumer-check README row naming a Gradle task that does not exist; reword the C# comment, whose calls run with telemetry off; point telemetry.md's C# row at CS5; and make the guard pin the C12 obligations rather than helper names, so a back-to-back stub no longer passes it.
bahdotsh
approved these changes
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this PR exists
C12 requires native hosts (not RN/Flutter) to fill telemetry platform fields and forward foreground/background app state. Swift/Kotlin/C# consumer-check apps had engine wiring but no copy-paste lifecycle pattern for telemetry.
This PR adds commented, compile-checked stubs in iOS/Android Kotlin and C# consumer-check, plus telemetry doc pointers.
Stack: base
feat/integration-testing-matrix(#749).What this changes (reviewer lens)
Use.ktconsumer_check_telemetry_lifecycle_is_documentedWire / FFI: unchanged; stubs are samples, not library API.
What we changed (technical)
bindings/kotlin/consumer-check/.../Use.kt— Android lifecycle observer sketch → engine app-state notifications.bindings/swift/consumer-check/.../Use.swift— parallel iOS pattern.bindings/csharp/consumer-check/Program.cs— lifecycle forward note.bindings/kotlin/consumer-check/README.md— paths table merged with JNI doc link.docs/telemetry.md— consumer-check as reference for C12.crates/offline-protocol-uniffi— guard over three consumer-check paths + telemetry doc needles.Commits on branch (vs #749): feature + rustfmt guard.
Risk / why it’s safe to merge
Test plan
cargo test -p offline-protocol-uniffi consumer_check_telemetry_lifecycle_is_documentedMerge order: after #749.