Skip to content

fix: log nil bridge before addUIBlock in New Architecture#287

Merged
jamesnrokt merged 1 commit intomainfrom
fix/log-add-ui-block-nil
Mar 5, 2026
Merged

fix: log nil bridge before addUIBlock in New Architecture#287
jamesnrokt merged 1 commit intomainfrom
fix/log-add-ui-block-nil

Conversation

@jamesnrokt
Copy link
Contributor

Summary

  • Adds a nil-guard log in RNMPRokt.mm before the addUIBlock: call that wraps selectPlacements
  • When self.bridge or self.bridge.uiManager is nil — silently swallowing the entire selectPlacements call in New Architecture bridgeless production builds — an NSLog now surfaces this in device logs
  • No behaviour change; the message-to-nil on addUIBlock: still occurs naturally, but the failure is now visible

Testing Plan

  • Build a New Architecture production/CI IPA and run on a physical device; the log should appear when bridgeless mode causes self.bridge to be nil
  • Verify no regression in Simulator or Xcode debug builds where self.bridge is non-nil (log should not fire)

Master Issue

Closes https://go.mparticle.com/work/REPLACEME

…hitecture

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jamesnrokt jamesnrokt requested a review from a team as a code owner March 5, 2026 20:58
Copilot AI review requested due to automatic review settings March 5, 2026 20:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a device-visible log when self.bridge / self.bridge.uiManager is nil before addUIBlock:, making a previously silent no-op in New Architecture bridgeless production builds observable.

Changes:

  • Adds a conditional log when self.bridge or self.bridge.uiManager is nil prior to addUIBlock:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jamesnrokt jamesnrokt merged commit 066b464 into main Mar 5, 2026
10 checks passed
@jamesnrokt jamesnrokt deleted the fix/log-add-ui-block-nil branch March 5, 2026 21:14
@rokt-releases rokt-releases bot mentioned this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants