Skip to content

Commit 066b464

Browse files
jamesnroktclaude
andauthored
fix: log nil bridge before addUIBlock in New Architecture (#287)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6640d6b commit 066b464

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ios/RNMParticle/RNMPRokt.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ - (void)selectPlacements:(NSString *)identifer
128128
[self.eventManager onWidgetHeightChanges:height placement:placementId];
129129
};
130130

131+
if (self.bridge == nil || self.bridge.uiManager == nil) {
132+
NSLog(@"[mParticle-Rokt] addUIBlock skipped: self.bridge%@ is nil. selectPlacements will not be called. This can occur in New Architecture bridgeless production builds.", self.bridge == nil ? @"" : @".uiManager");
133+
}
131134
[self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *,UIView *> *viewRegistry) {
132135
NSMutableDictionary *nativePlaceholders = [self getNativePlaceholders:placeholders viewRegistry:viewRegistry];
133136

0 commit comments

Comments
 (0)