From 297b93b693649a282c1c52602ad6dad5ff399d12 Mon Sep 17 00:00:00 2001 From: David Duarte Date: Tue, 31 Mar 2026 14:30:03 +0200 Subject: [PATCH 1/3] fix(ios): guard +load with #ifdef RCT_DYNAMIC_FRAMEWORKS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The +load methods in 12 ComponentView files are unconditional, but their parent RCTViewComponentView correctly guards its +load behind run even when dynamic frameworks are not used, causing conflicts with third-party SDKs (e.g. Akamai BMP) that also use +load — particularly on x86_64 simulators where the load order differs from arm64. This matches the pattern used by React Native core in RCTViewComponentView.mm (see facebook/react-native#37274). Note: UIViewController+RNScreens.mm is intentionally NOT changed as its +load performs method swizzling that is functionally required. --- ios/RNSFullWindowOverlay.mm | 2 ++ ios/RNSModalScreen.mm | 2 ++ ios/RNSScreen.mm | 2 ++ ios/RNSScreenContainer.mm | 2 ++ ios/RNSScreenContentWrapper.mm | 2 ++ ios/RNSScreenFooter.mm | 2 ++ ios/RNSScreenNavigationContainer.mm | 2 ++ ios/RNSScreenStack.mm | 2 ++ ios/RNSScreenStackHeaderConfig.mm | 2 ++ ios/RNSScreenStackHeaderSubview.mm | 2 ++ ios/RNSSearchBar.mm | 2 ++ ios/safe-area/RNSSafeAreaViewComponentView.mm | 2 ++ 12 files changed, 24 insertions(+) diff --git a/ios/RNSFullWindowOverlay.mm b/ios/RNSFullWindowOverlay.mm index 2d60787753..ec9380eff1 100644 --- a/ios/RNSFullWindowOverlay.mm +++ b/ios/RNSFullWindowOverlay.mm @@ -72,10 +72,12 @@ @implementation RNSFullWindowOverlay { } // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif - (instancetype)init { diff --git a/ios/RNSModalScreen.mm b/ios/RNSModalScreen.mm index f50c86d625..4fe2ae7e97 100644 --- a/ios/RNSModalScreen.mm +++ b/ios/RNSModalScreen.mm @@ -28,10 +28,12 @@ - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection } // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif + (react::ComponentDescriptorProvider)componentDescriptorProvider { diff --git a/ios/RNSScreen.mm b/ios/RNSScreen.mm index ab2ffdd508..efcf679bde 100644 --- a/ios/RNSScreen.mm +++ b/ios/RNSScreen.mm @@ -68,10 +68,12 @@ @implementation RNSScreenView { } // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif - (instancetype)initWithFrame:(CGRect)frame { diff --git a/ios/RNSScreenContainer.mm b/ios/RNSScreenContainer.mm index 86633d937c..5378e52bd9 100644 --- a/ios/RNSScreenContainer.mm +++ b/ios/RNSScreenContainer.mm @@ -251,10 +251,12 @@ - (void)layoutSubviews #pragma mark-- Fabric specific // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif #pragma mark - RCTComponentViewProtocol diff --git a/ios/RNSScreenContentWrapper.mm b/ios/RNSScreenContentWrapper.mm index 9243f204cf..78747606a9 100644 --- a/ios/RNSScreenContentWrapper.mm +++ b/ios/RNSScreenContentWrapper.mm @@ -184,10 +184,12 @@ - (void)updateLayoutMetrics:(const facebook::react::LayoutMetrics &)layoutMetric } // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif // RCT_DYNAMIC_FRAMEWORKS @end diff --git a/ios/RNSScreenFooter.mm b/ios/RNSScreenFooter.mm index 97ac0cdccf..e3bdc97e87 100644 --- a/ios/RNSScreenFooter.mm +++ b/ios/RNSScreenFooter.mm @@ -91,10 +91,12 @@ - (void)layoutSubviews } // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif + (react::ComponentDescriptorProvider)componentDescriptorProvider { diff --git a/ios/RNSScreenNavigationContainer.mm b/ios/RNSScreenNavigationContainer.mm index 2394c6e947..577f61a57c 100644 --- a/ios/RNSScreenNavigationContainer.mm +++ b/ios/RNSScreenNavigationContainer.mm @@ -43,10 +43,12 @@ - (void)updateContainer } // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif @end diff --git a/ios/RNSScreenStack.mm b/ios/RNSScreenStack.mm index e2ea05884f..bd43976a3c 100644 --- a/ios/RNSScreenStack.mm +++ b/ios/RNSScreenStack.mm @@ -182,10 +182,12 @@ @implementation RNSScreenStackView { } // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif - (instancetype)initWithFrame:(CGRect)frame { diff --git a/ios/RNSScreenStackHeaderConfig.mm b/ios/RNSScreenStackHeaderConfig.mm index 70a48fb6c2..6f918c03a8 100644 --- a/ios/RNSScreenStackHeaderConfig.mm +++ b/ios/RNSScreenStackHeaderConfig.mm @@ -63,10 +63,12 @@ @implementation RNSScreenStackHeaderConfig { } // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif - (instancetype)initWithFrame:(CGRect)frame { diff --git a/ios/RNSScreenStackHeaderSubview.mm b/ios/RNSScreenStackHeaderSubview.mm index 25b17de62d..1fb17d9204 100644 --- a/ios/RNSScreenStackHeaderSubview.mm +++ b/ios/RNSScreenStackHeaderSubview.mm @@ -111,10 +111,12 @@ - (void)layoutSubviews } // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif - (instancetype)initWithFrame:(CGRect)frame { diff --git a/ios/RNSSearchBar.mm b/ios/RNSSearchBar.mm index e570363e7b..8e0368c008 100644 --- a/ios/RNSSearchBar.mm +++ b/ios/RNSSearchBar.mm @@ -45,10 +45,12 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge #ifdef RCT_NEW_ARCH_ENABLED // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif - (instancetype)init { diff --git a/ios/safe-area/RNSSafeAreaViewComponentView.mm b/ios/safe-area/RNSSafeAreaViewComponentView.mm index e984e212a3..ddfe9732d6 100644 --- a/ios/safe-area/RNSSafeAreaViewComponentView.mm +++ b/ios/safe-area/RNSSafeAreaViewComponentView.mm @@ -26,10 +26,12 @@ @implementation RNSSafeAreaViewComponentView { } // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif - (instancetype)initWithFrame:(CGRect)frame { From 4d7d84c74069ca451a91be563b56fd695d745fea Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Tue, 7 Apr 2026 15:45:27 +0200 Subject: [PATCH 2/3] fix(ios): add missing +load guards and normalize #endif comments Add guarded +load to 9 ComponentView subclasses (tabs, gamma) that were missing it entirely, which would prevent proper registration when using USE_FRAMEWORKS=dynamic. Normalize all #endif to include the // RCT_DYNAMIC_FRAMEWORKS comment for consistency. --- ios/RNSFullWindowOverlay.mm | 2 +- ios/RNSModalScreen.mm | 2 +- ios/RNSScreen.mm | 2 +- ios/RNSScreenContainer.mm | 2 +- ios/RNSScreenFooter.mm | 2 +- ios/RNSScreenNavigationContainer.mm | 2 +- ios/RNSScreenStack.mm | 2 +- ios/RNSScreenStackHeaderConfig.mm | 2 +- ios/RNSScreenStackHeaderSubview.mm | 2 +- ios/RNSSearchBar.mm | 2 +- .../RNSScrollViewMarkerComponentView.mm | 8 ++++++++ ios/gamma/split/RNSSplitHostComponentView.mm | 8 ++++++++ ios/gamma/split/RNSSplitScreenComponentView.mm | 8 ++++++++ ios/gamma/stack/host/RNSStackHostComponentView.mm | 10 ++++++++++ ios/gamma/stack/screen/RNSStackScreenComponentView.mm | 8 ++++++++ ios/safe-area/RNSSafeAreaViewComponentView.mm | 2 +- .../RNSTabsBottomAccessoryComponentView.mm | 8 ++++++++ .../RNSTabsBottomAccessoryContentComponentView.mm | 8 ++++++++ ios/tabs/host/RNSTabsHostComponentView.mm | 8 ++++++++ ios/tabs/screen/RNSTabsScreenComponentView.mm | 8 ++++++++ 20 files changed, 85 insertions(+), 11 deletions(-) diff --git a/ios/RNSFullWindowOverlay.mm b/ios/RNSFullWindowOverlay.mm index ec9380eff1..cddfdc3857 100644 --- a/ios/RNSFullWindowOverlay.mm +++ b/ios/RNSFullWindowOverlay.mm @@ -77,7 +77,7 @@ + (void)load { [super load]; } -#endif +#endif // RCT_DYNAMIC_FRAMEWORKS - (instancetype)init { diff --git a/ios/RNSModalScreen.mm b/ios/RNSModalScreen.mm index 4fe2ae7e97..360a652057 100644 --- a/ios/RNSModalScreen.mm +++ b/ios/RNSModalScreen.mm @@ -33,7 +33,7 @@ + (void)load { [super load]; } -#endif +#endif // RCT_DYNAMIC_FRAMEWORKS + (react::ComponentDescriptorProvider)componentDescriptorProvider { diff --git a/ios/RNSScreen.mm b/ios/RNSScreen.mm index efcf679bde..58d6e0b818 100644 --- a/ios/RNSScreen.mm +++ b/ios/RNSScreen.mm @@ -73,7 +73,7 @@ + (void)load { [super load]; } -#endif +#endif // RCT_DYNAMIC_FRAMEWORKS - (instancetype)initWithFrame:(CGRect)frame { diff --git a/ios/RNSScreenContainer.mm b/ios/RNSScreenContainer.mm index 5378e52bd9..faaa4917c3 100644 --- a/ios/RNSScreenContainer.mm +++ b/ios/RNSScreenContainer.mm @@ -256,7 +256,7 @@ + (void)load { [super load]; } -#endif +#endif // RCT_DYNAMIC_FRAMEWORKS #pragma mark - RCTComponentViewProtocol diff --git a/ios/RNSScreenFooter.mm b/ios/RNSScreenFooter.mm index e3bdc97e87..612ec636f1 100644 --- a/ios/RNSScreenFooter.mm +++ b/ios/RNSScreenFooter.mm @@ -96,7 +96,7 @@ + (void)load { [super load]; } -#endif +#endif // RCT_DYNAMIC_FRAMEWORKS + (react::ComponentDescriptorProvider)componentDescriptorProvider { diff --git a/ios/RNSScreenNavigationContainer.mm b/ios/RNSScreenNavigationContainer.mm index 577f61a57c..da779278ed 100644 --- a/ios/RNSScreenNavigationContainer.mm +++ b/ios/RNSScreenNavigationContainer.mm @@ -48,7 +48,7 @@ + (void)load { [super load]; } -#endif +#endif // RCT_DYNAMIC_FRAMEWORKS @end diff --git a/ios/RNSScreenStack.mm b/ios/RNSScreenStack.mm index bd43976a3c..a71a8cec8c 100644 --- a/ios/RNSScreenStack.mm +++ b/ios/RNSScreenStack.mm @@ -187,7 +187,7 @@ + (void)load { [super load]; } -#endif +#endif // RCT_DYNAMIC_FRAMEWORKS - (instancetype)initWithFrame:(CGRect)frame { diff --git a/ios/RNSScreenStackHeaderConfig.mm b/ios/RNSScreenStackHeaderConfig.mm index 6f918c03a8..c74fc38365 100644 --- a/ios/RNSScreenStackHeaderConfig.mm +++ b/ios/RNSScreenStackHeaderConfig.mm @@ -68,7 +68,7 @@ + (void)load { [super load]; } -#endif +#endif // RCT_DYNAMIC_FRAMEWORKS - (instancetype)initWithFrame:(CGRect)frame { diff --git a/ios/RNSScreenStackHeaderSubview.mm b/ios/RNSScreenStackHeaderSubview.mm index 1fb17d9204..f32ccca846 100644 --- a/ios/RNSScreenStackHeaderSubview.mm +++ b/ios/RNSScreenStackHeaderSubview.mm @@ -116,7 +116,7 @@ + (void)load { [super load]; } -#endif +#endif // RCT_DYNAMIC_FRAMEWORKS - (instancetype)initWithFrame:(CGRect)frame { diff --git a/ios/RNSSearchBar.mm b/ios/RNSSearchBar.mm index 8e0368c008..d42c504260 100644 --- a/ios/RNSSearchBar.mm +++ b/ios/RNSSearchBar.mm @@ -50,7 +50,7 @@ + (void)load { [super load]; } -#endif +#endif // RCT_DYNAMIC_FRAMEWORKS - (instancetype)init { diff --git a/ios/gamma/scroll-view-marker/RNSScrollViewMarkerComponentView.mm b/ios/gamma/scroll-view-marker/RNSScrollViewMarkerComponentView.mm index a53a54940c..8355520bea 100644 --- a/ios/gamma/scroll-view-marker/RNSScrollViewMarkerComponentView.mm +++ b/ios/gamma/scroll-view-marker/RNSScrollViewMarkerComponentView.mm @@ -241,6 +241,14 @@ + (BOOL)shouldBeRecycled return NO; } +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); diff --git a/ios/gamma/split/RNSSplitHostComponentView.mm b/ios/gamma/split/RNSSplitHostComponentView.mm index fd3065a23b..6cb05bcd74 100644 --- a/ios/gamma/split/RNSSplitHostComponentView.mm +++ b/ios/gamma/split/RNSSplitHostComponentView.mm @@ -191,6 +191,14 @@ - (void)unmountChildComponentView:(UIView *)childCompo _hasModifiedReactSubviewsInCurrentTransaction = true; } +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); diff --git a/ios/gamma/split/RNSSplitScreenComponentView.mm b/ios/gamma/split/RNSSplitScreenComponentView.mm index a554c7cd01..511c584f0e 100644 --- a/ios/gamma/split/RNSSplitScreenComponentView.mm +++ b/ios/gamma/split/RNSSplitScreenComponentView.mm @@ -149,6 +149,14 @@ - (void)safeAreaInsetsDidChange #pragma mark - RCTComponentViewProtocol +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); diff --git a/ios/gamma/stack/host/RNSStackHostComponentView.mm b/ios/gamma/stack/host/RNSStackHostComponentView.mm index 23cf80004d..5b4a229c0d 100644 --- a/ios/gamma/stack/host/RNSStackHostComponentView.mm +++ b/ios/gamma/stack/host/RNSStackHostComponentView.mm @@ -156,6 +156,16 @@ - (void)mountingTransactionDidMount:(const facebook::react::MountingTransaction withRenderedScreens:_renderedScreens]; } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end Class RNSStackHostCls(void) diff --git a/ios/gamma/stack/screen/RNSStackScreenComponentView.mm b/ios/gamma/stack/screen/RNSStackScreenComponentView.mm index 26499910a8..f89e5ed6bf 100644 --- a/ios/gamma/stack/screen/RNSStackScreenComponentView.mm +++ b/ios/gamma/stack/screen/RNSStackScreenComponentView.mm @@ -122,6 +122,14 @@ - (void)updateEventEmitter:(const facebook::react::EventEmitter::Shared &)eventE updateEventEmitter:std::static_pointer_cast(eventEmitter)]; } +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); diff --git a/ios/safe-area/RNSSafeAreaViewComponentView.mm b/ios/safe-area/RNSSafeAreaViewComponentView.mm index ddfe9732d6..9a30b55b5b 100644 --- a/ios/safe-area/RNSSafeAreaViewComponentView.mm +++ b/ios/safe-area/RNSSafeAreaViewComponentView.mm @@ -31,7 +31,7 @@ + (void)load { [super load]; } -#endif +#endif // RCT_DYNAMIC_FRAMEWORKS - (instancetype)initWithFrame:(CGRect)frame { diff --git a/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.mm b/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.mm index ba231cf55b..03578bc839 100644 --- a/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.mm +++ b/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.mm @@ -101,6 +101,14 @@ - (void)updateEventEmitter:(const facebook::react::EventEmitter::Shared &)eventE [_reactEventEmitter updateEventEmitter:castedEventEmitter]; } +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); diff --git a/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.mm b/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.mm index c6e7001505..4f53b20e6a 100644 --- a/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.mm +++ b/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.mm @@ -93,6 +93,14 @@ - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask #endif // REACT_NATIVE_VERSION_MINOR >= 82 +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); diff --git a/ios/tabs/host/RNSTabsHostComponentView.mm b/ios/tabs/host/RNSTabsHostComponentView.mm index 727fb244c5..b96e4e01af 100644 --- a/ios/tabs/host/RNSTabsHostComponentView.mm +++ b/ios/tabs/host/RNSTabsHostComponentView.mm @@ -381,6 +381,14 @@ - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask [super finalizeUpdates:updateMask]; } +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); diff --git a/ios/tabs/screen/RNSTabsScreenComponentView.mm b/ios/tabs/screen/RNSTabsScreenComponentView.mm index 7abe5fc8fc..65a53ac5a7 100644 --- a/ios/tabs/screen/RNSTabsScreenComponentView.mm +++ b/ios/tabs/screen/RNSTabsScreenComponentView.mm @@ -482,6 +482,14 @@ - (void)unmountChildComponentView:(UIView *)childCompo [super unmountChildComponentView:childComponentView index:index]; } +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); From 1d88a2b08fb18904cf49f98eed02123139e70731 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Wed, 15 Apr 2026 12:04:00 +0200 Subject: [PATCH 3/3] refactor(ios): move +load to end of @implementation with pragma mark MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relocate guarded +load methods to the end of their @implementation blocks under a dedicated "#pragma mark - Dynamic frameworks support" section across all 20 ComponentView files. No behavioral change — purely a code organization refactor for consistency. --- ios/RNSFullWindowOverlay.mm | 18 ++++++++++-------- ios/RNSModalScreen.mm | 12 +++++++----- ios/RNSScreen.mm | 18 ++++++++++-------- ios/RNSScreenContainer.mm | 19 +++++++++++-------- ios/RNSScreenContentWrapper.mm | 2 ++ ios/RNSScreenFooter.mm | 18 ++++++++++-------- ios/RNSScreenNavigationContainer.mm | 2 ++ ios/RNSScreenStack.mm | 18 ++++++++++-------- ios/RNSScreenStackHeaderConfig.mm | 18 ++++++++++-------- ios/RNSScreenStackHeaderSubview.mm | 18 ++++++++++-------- ios/RNSSearchBar.mm | 18 ++++++++++-------- .../RNSScrollViewMarkerComponentView.mm | 18 ++++++++++-------- ios/gamma/split/RNSSplitHostComponentView.mm | 18 ++++++++++-------- .../split/RNSSplitScreenComponentView.mm | 18 ++++++++++-------- .../screen/RNSStackScreenComponentView.mm | 18 ++++++++++-------- ios/safe-area/RNSSafeAreaViewComponentView.mm | 18 ++++++++++-------- .../RNSTabsBottomAccessoryComponentView.mm | 18 ++++++++++-------- ...TabsBottomAccessoryContentComponentView.mm | 18 ++++++++++-------- ios/tabs/host/RNSTabsHostComponentView.mm | 18 ++++++++++-------- ios/tabs/screen/RNSTabsScreenComponentView.mm | 18 ++++++++++-------- 20 files changed, 182 insertions(+), 141 deletions(-) diff --git a/ios/RNSFullWindowOverlay.mm b/ios/RNSFullWindowOverlay.mm index cddfdc3857..1a820b450d 100644 --- a/ios/RNSFullWindowOverlay.mm +++ b/ios/RNSFullWindowOverlay.mm @@ -71,14 +71,6 @@ @implementation RNSFullWindowOverlay { RCTSurfaceTouchHandler *_touchHandler; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - - (instancetype)init { if (self = [super init]) { @@ -229,6 +221,16 @@ - (void)updateProps:(const facebook::react::Props::Shared &)props [super updateProps:props oldProps:oldProps]; } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end Class RNSFullWindowOverlayCls(void) diff --git a/ios/RNSModalScreen.mm b/ios/RNSModalScreen.mm index 360a652057..a946b9eca8 100644 --- a/ios/RNSModalScreen.mm +++ b/ios/RNSModalScreen.mm @@ -27,6 +27,13 @@ - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection }]; } ++ (react::ComponentDescriptorProvider)componentDescriptorProvider +{ + return react::concreteComponentDescriptorProvider(); +} + +#pragma mark - Dynamic frameworks support + // Needed because of this: https://github.com/facebook/react-native/pull/37274 #ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load @@ -35,11 +42,6 @@ + (void)load } #endif // RCT_DYNAMIC_FRAMEWORKS -+ (react::ComponentDescriptorProvider)componentDescriptorProvider -{ - return react::concreteComponentDescriptorProvider(); -} - @end Class RNSModalScreenCls(void) diff --git a/ios/RNSScreen.mm b/ios/RNSScreen.mm index 58d6e0b818..69d4d9a470 100644 --- a/ios/RNSScreen.mm +++ b/ios/RNSScreen.mm @@ -67,14 +67,6 @@ @implementation RNSScreenView { NSMutableArray *_reactSubviews; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { @@ -1434,6 +1426,16 @@ - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask #endif // !TARGET_OS_TV && !TARGET_OS_VISION } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end Class RNSScreenCls(void) diff --git a/ios/RNSScreenContainer.mm b/ios/RNSScreenContainer.mm index faaa4917c3..17258ce8df 100644 --- a/ios/RNSScreenContainer.mm +++ b/ios/RNSScreenContainer.mm @@ -250,14 +250,6 @@ - (void)layoutSubviews #pragma mark-- Fabric specific -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - #pragma mark - RCTComponentViewProtocol - (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index @@ -318,6 +310,17 @@ - (void)prepareForRecycle [_controller willMoveToParentViewController:nil]; [_controller removeFromParentViewController]; } + +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end Class RNSScreenContainerCls(void) diff --git a/ios/RNSScreenContentWrapper.mm b/ios/RNSScreenContentWrapper.mm index 78747606a9..e5e640052d 100644 --- a/ios/RNSScreenContentWrapper.mm +++ b/ios/RNSScreenContentWrapper.mm @@ -183,6 +183,8 @@ - (void)updateLayoutMetrics:(const facebook::react::LayoutMetrics &)layoutMetric return RNSScreenContentWrapper.class; } +#pragma mark - Dynamic frameworks support + // Needed because of this: https://github.com/facebook/react-native/pull/37274 #ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load diff --git a/ios/RNSScreenFooter.mm b/ios/RNSScreenFooter.mm index 612ec636f1..9c6f27973e 100644 --- a/ios/RNSScreenFooter.mm +++ b/ios/RNSScreenFooter.mm @@ -90,14 +90,6 @@ - (void)layoutSubviews // } } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); @@ -108,6 +100,16 @@ + (void)load return RNSScreenFooter.class; } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end @implementation RNSScreenFooterManager diff --git a/ios/RNSScreenNavigationContainer.mm b/ios/RNSScreenNavigationContainer.mm index da779278ed..bf43fd6b11 100644 --- a/ios/RNSScreenNavigationContainer.mm +++ b/ios/RNSScreenNavigationContainer.mm @@ -42,6 +42,8 @@ - (void)updateContainer return react::concreteComponentDescriptorProvider(); } +#pragma mark - Dynamic frameworks support + // Needed because of this: https://github.com/facebook/react-native/pull/37274 #ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load diff --git a/ios/RNSScreenStack.mm b/ios/RNSScreenStack.mm index a71a8cec8c..11416f695a 100644 --- a/ios/RNSScreenStack.mm +++ b/ios/RNSScreenStack.mm @@ -181,14 +181,6 @@ @implementation RNSScreenStackView { UIPanGestureRecognizer *_sinkEventsPanGestureRecognizer; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { @@ -1436,6 +1428,16 @@ - (void)prepareForRecycle return react::concreteComponentDescriptorProvider(); } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end Class RNSScreenStackCls(void) diff --git a/ios/RNSScreenStackHeaderConfig.mm b/ios/RNSScreenStackHeaderConfig.mm index c74fc38365..5970e3e3a6 100644 --- a/ios/RNSScreenStackHeaderConfig.mm +++ b/ios/RNSScreenStackHeaderConfig.mm @@ -62,14 +62,6 @@ @implementation RNSScreenStackHeaderConfig { RCTImageLoader *_imageLoader; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { @@ -1115,6 +1107,16 @@ - (void)updateState:(const facebook::react::State::Shared &)state } } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end Class RNSScreenStackHeaderConfigCls(void) diff --git a/ios/RNSScreenStackHeaderSubview.mm b/ios/RNSScreenStackHeaderSubview.mm index f32ccca846..15c0da5242 100644 --- a/ios/RNSScreenStackHeaderSubview.mm +++ b/ios/RNSScreenStackHeaderSubview.mm @@ -110,14 +110,6 @@ - (void)layoutSubviews [self updateShadowStateInContextOfAncestorView:[self findNavigationBar]]; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { @@ -301,6 +293,16 @@ - (void)setHidesSharedBackground:(BOOL)hidesSharedBackground [self configureBarButtonItem]; } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end @implementation RNSScreenStackHeaderSubviewManager diff --git a/ios/RNSSearchBar.mm b/ios/RNSSearchBar.mm index d42c504260..c78c014141 100644 --- a/ios/RNSSearchBar.mm +++ b/ios/RNSSearchBar.mm @@ -44,14 +44,6 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge #ifdef RCT_NEW_ARCH_ENABLED -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - - (instancetype)init { if (self = [super init]) { @@ -469,6 +461,16 @@ + (BOOL)shouldBeRecycled #else #endif // RCT_NEW_ARCH_ENABLED +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end #ifdef RCT_NEW_ARCH_ENABLED diff --git a/ios/gamma/scroll-view-marker/RNSScrollViewMarkerComponentView.mm b/ios/gamma/scroll-view-marker/RNSScrollViewMarkerComponentView.mm index 8355520bea..52c61c863c 100644 --- a/ios/gamma/scroll-view-marker/RNSScrollViewMarkerComponentView.mm +++ b/ios/gamma/scroll-view-marker/RNSScrollViewMarkerComponentView.mm @@ -241,14 +241,6 @@ + (BOOL)shouldBeRecycled return NO; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); @@ -262,6 +254,16 @@ - (void)mountingTransactionDidMount:(const facebook::react::MountingTransaction [self maybeRegisterWithSeekingAncestor]; } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end Class RNSScrollViewMarkerCls(void) diff --git a/ios/gamma/split/RNSSplitHostComponentView.mm b/ios/gamma/split/RNSSplitHostComponentView.mm index 6cb05bcd74..721c480be0 100644 --- a/ios/gamma/split/RNSSplitHostComponentView.mm +++ b/ios/gamma/split/RNSSplitHostComponentView.mm @@ -191,14 +191,6 @@ - (void)unmountChildComponentView:(UIView *)childCompo _hasModifiedReactSubviewsInCurrentTransaction = true; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); @@ -423,6 +415,16 @@ - (nonnull RNSSplitHostComponentEventEmitter *)reactEventEmitter return _reactEventEmitter; } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end Class RNSSplitHostCls(void) diff --git a/ios/gamma/split/RNSSplitScreenComponentView.mm b/ios/gamma/split/RNSSplitScreenComponentView.mm index 511c584f0e..b87738cb35 100644 --- a/ios/gamma/split/RNSSplitScreenComponentView.mm +++ b/ios/gamma/split/RNSSplitScreenComponentView.mm @@ -149,14 +149,6 @@ - (void)safeAreaInsetsDidChange #pragma mark - RCTComponentViewProtocol -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); @@ -204,6 +196,16 @@ - (void)invalidate _controller = nil; } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end Class RNSSplitScreenCls(void) diff --git a/ios/gamma/stack/screen/RNSStackScreenComponentView.mm b/ios/gamma/stack/screen/RNSStackScreenComponentView.mm index f89e5ed6bf..52209c0cfe 100644 --- a/ios/gamma/stack/screen/RNSStackScreenComponentView.mm +++ b/ios/gamma/stack/screen/RNSStackScreenComponentView.mm @@ -122,14 +122,6 @@ - (void)updateEventEmitter:(const facebook::react::EventEmitter::Shared &)eventE updateEventEmitter:std::static_pointer_cast(eventEmitter)]; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); @@ -147,6 +139,16 @@ - (void)invalidate [self invalidateImpl]; } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end Class RNSStackScreenCls(void) diff --git a/ios/safe-area/RNSSafeAreaViewComponentView.mm b/ios/safe-area/RNSSafeAreaViewComponentView.mm index 9a30b55b5b..1af10b649c 100644 --- a/ios/safe-area/RNSSafeAreaViewComponentView.mm +++ b/ios/safe-area/RNSSafeAreaViewComponentView.mm @@ -25,14 +25,6 @@ @implementation RNSSafeAreaViewComponentView { __weak UIView *_Nullable _providerView; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { @@ -155,6 +147,16 @@ - (void)prepareForRecycle _currentSafeAreaInsets = UIEdgeInsetsZero; } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end #pragma mark - Utility functions diff --git a/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.mm b/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.mm index 03578bc839..47706c4425 100644 --- a/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.mm +++ b/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.mm @@ -101,14 +101,6 @@ - (void)updateEventEmitter:(const facebook::react::EventEmitter::Shared &)eventE [_reactEventEmitter updateEventEmitter:castedEventEmitter]; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); @@ -182,6 +174,16 @@ - (nonnull RNSTabsBottomAccessoryEventEmitter *)reactEventEmitter #endif // RNS_TABS_BOTTOM_ACCESSORY_AVAILABLE +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end #if RCT_NEW_ARCH_ENABLED diff --git a/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.mm b/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.mm index 4f53b20e6a..00fb92142a 100644 --- a/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.mm +++ b/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.mm @@ -93,14 +93,6 @@ - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask #endif // REACT_NATIVE_VERSION_MINOR >= 82 -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); @@ -117,6 +109,16 @@ + (BOOL)shouldBeRecycled #endif // RCT_NEW_ARCH_ENABLED +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end #if RCT_NEW_ARCH_ENABLED diff --git a/ios/tabs/host/RNSTabsHostComponentView.mm b/ios/tabs/host/RNSTabsHostComponentView.mm index b96e4e01af..5abfd295ff 100644 --- a/ios/tabs/host/RNSTabsHostComponentView.mm +++ b/ios/tabs/host/RNSTabsHostComponentView.mm @@ -381,14 +381,6 @@ - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask [super finalizeUpdates:updateMask]; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); @@ -665,6 +657,16 @@ - (void)tabBarController:(nonnull RNSTabBarController *)tabBarController }]; } +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end #pragma mark - Modified React Subviews implementation diff --git a/ios/tabs/screen/RNSTabsScreenComponentView.mm b/ios/tabs/screen/RNSTabsScreenComponentView.mm index 65a53ac5a7..d4a2c7e2db 100644 --- a/ios/tabs/screen/RNSTabsScreenComponentView.mm +++ b/ios/tabs/screen/RNSTabsScreenComponentView.mm @@ -482,14 +482,6 @@ - (void)unmountChildComponentView:(UIView *)childCompo [super unmountChildComponentView:childComponentView index:index]; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -#ifdef RCT_DYNAMIC_FRAMEWORKS -+ (void)load -{ - [super load]; -} -#endif // RCT_DYNAMIC_FRAMEWORKS - + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); @@ -759,6 +751,16 @@ -(RCTDirectEventBlock)eventName #endif // RCT_NEW_ARCH_ENABLED +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load +{ + [super load]; +} +#endif // RCT_DYNAMIC_FRAMEWORKS + @end #if RCT_NEW_ARCH_ENABLED