feat: MAUI API revamp#573
Conversation
Vadman97
left a comment
There was a problem hiding this comment.
should this be a feat! major bump? or are we still on 0.x, then we are ok
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 79aae6e. Configure here.
| bridge.Start(mobileKey, observability, replay, observabilityVersion); | ||
| #endif | ||
|
|
||
| LDReplay.OnNativeStarted(ldNative.Replay); |
There was a problem hiding this comment.
Pre-init buffer applies pending value after native bridge starts
Medium Severity
LDReplay.OnNativeStarted (which calls Bind to apply buffered IsEnabled writes) is invoked AFTER bridge.Start has already consumed the replay options. On Android, options are converted via ToNative() before Bind runs, so pending values never reach native. On iOS, the bridge reads initial values during Start. A user who sets LDReplay.IsEnabled = false before init expects native replay to start disabled, but the native layer starts with the original value because Bind applies too late.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 79aae6e. Configure here.


Summary
LDObserve.Init(...)API format with two entry points:LDObserve.Init(mobileKey, observabilityOptions, sessionReplayOptions)for standalone initialization.LDObserve.Init(client, observabilityOptions, sessionReplayOptions)for LaunchDarkly client-backed initialization.ObservabilityPlugin, removing the separate session replay plugin and the fragile plugin orchestrator.ObservabilityOptionsand optionalSessionReplayOptionsinstead of registering plugins throughPluginConfigurationBuilder.Details
LDNativeis now internal and called throughLDObserve.Init.SessionReplayOptionsis optional; when omitted, replay is not wired up.LDObservefacade soRecordLog, metrics, spans, and errors work without anLdClient.ObservabilityService, so network tracing is enabled consistently across both initialization paths.Testing
LdClientvariants.Note
Medium Risk
Public MAUI initialization API and plugin registration change (breaking for integrators on the old dual-plugin pattern); native init parameter renames affect multiple bindings but are mechanical.
Overview
The .NET MAUI observability package moves to a single
LDObserve.Initentry point instead of registering separateObservabilityPlugin/SessionReplayPluginonLdClient.Init(mobileKey, …)starts the native stack without a feature-flag client;Init(client, …)registers one combinedObservabilityPluginthat boots native code and wires observability + replay hooks.PluginOrchestrator,SessionReplayPlugin, andINativePluginare removed;LDReplay.IsEnabledreplaces sampleMauiProgram.LdNativefor toggling replay.Native
LDObserve.initcall sites (Android e2e, Flutter, MAUI bridge) rename parameters fromoptions/replayOptionstoobservability/replay. Docs and the sample app follow the new API; package version bumps to 0.11.0 andLaunchDarkly.ClientSdkto [5.8.0, 6.0.0); iOS binding setsSupportedOSPlatformVersion15.0.Reviewed by Cursor Bugbot for commit 86e97a7. Bugbot is set up for automated code reviews on this repo. Configure here.