From b57ea699cbae421882cedccbb62418c566b12494 Mon Sep 17 00:00:00 2001 From: James Newman Date: Thu, 5 Mar 2026 15:51:52 -0500 Subject: [PATCH] fix(ios): log when addUIBlock is skipped due to nil bridge in New Architecture Co-Authored-By: Claude Sonnet 4.6 --- ios/RNMParticle/RNMPRokt.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/RNMParticle/RNMPRokt.mm b/ios/RNMParticle/RNMPRokt.mm index 5260e14..fbae339 100644 --- a/ios/RNMParticle/RNMPRokt.mm +++ b/ios/RNMParticle/RNMPRokt.mm @@ -128,6 +128,9 @@ - (void)selectPlacements:(NSString *)identifer [self.eventManager onWidgetHeightChanges:height placement:placementId]; }; + if (self.bridge == nil || self.bridge.uiManager == nil) { + 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"); + } [self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary *viewRegistry) { NSMutableDictionary *nativePlaceholders = [self getNativePlaceholders:placeholders viewRegistry:viewRegistry];