You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Enhances click/tap analytics on iOS and makes invasive touch
instrumentation honor the `instrumentation` config.
- **`event.id` via `ldId`/`ldClick`**: explicit developer-supplied
identifier takes precedence over derived platform ids (`UIView.ldId(_:)`
for UIKit, `.ldClick(_:)` for SwiftUI, resolved through a non-consuming
`LdClickRegistry`).
- **`event.screen_id` + `event.screen_name`**: stamped on both OTel
`click` spans and Session Replay click events; `screen_name` threaded
from the `ScreenStack`.
- **Manual `trackClick` API** mirroring the auto-captured click shape.
- **`Instrumentation.enabled` / `.disabled`** convenience accessors.
- **Touch-capture gating**: the `UIWindow.sendEvent` swizzle +
hit-testing now install only when `instrumentation.userTaps` is enabled
**or** Session Replay is recording (SR self-starts the shared,
idempotent manager). With both off, no swizzle/hit-testing is installed.
- Fix `UIWindowSwizzleSource` `isActive` idempotency.
## Test plan
- [ ] `LaunchDarklyObservability` + `LaunchDarklySessionReplay` build
(simulator)
- [ ] Unit tests (`LdClickRegistryTests`, `ClickSpanTests`) pass
- [ ] TestApp: taps emit `event.id` (ldId), `event.screen_id`,
`event.screen_name` on spans and SR
- [ ] `instrumentation: .disabled` with SR off ⇒ no swizzle/hit-testing
Made with [Cursor](https://cursor.com)
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments