diff --git a/ios/RNSFullWindowOverlay.mm b/ios/RNSFullWindowOverlay.mm index 2d60787753..1a820b450d 100644 --- a/ios/RNSFullWindowOverlay.mm +++ b/ios/RNSFullWindowOverlay.mm @@ -71,12 +71,6 @@ @implementation RNSFullWindowOverlay { RCTSurfaceTouchHandler *_touchHandler; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -+ (void)load -{ - [super load]; -} - - (instancetype)init { if (self = [super init]) { @@ -227,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 f50c86d625..a946b9eca8 100644 --- a/ios/RNSModalScreen.mm +++ b/ios/RNSModalScreen.mm @@ -27,16 +27,20 @@ - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection }]; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -+ (void)load ++ (react::ComponentDescriptorProvider)componentDescriptorProvider { - [super load]; + return react::concreteComponentDescriptorProvider(); } -+ (react::ComponentDescriptorProvider)componentDescriptorProvider +#pragma mark - Dynamic frameworks support + +// Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS ++ (void)load { - return react::concreteComponentDescriptorProvider(); + [super load]; } +#endif // RCT_DYNAMIC_FRAMEWORKS @end diff --git a/ios/RNSScreen.mm b/ios/RNSScreen.mm index ab2ffdd508..69d4d9a470 100644 --- a/ios/RNSScreen.mm +++ b/ios/RNSScreen.mm @@ -67,12 +67,6 @@ @implementation RNSScreenView { NSMutableArray *_reactSubviews; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -+ (void)load -{ - [super load]; -} - - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { @@ -1432,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 86633d937c..17258ce8df 100644 --- a/ios/RNSScreenContainer.mm +++ b/ios/RNSScreenContainer.mm @@ -250,12 +250,6 @@ - (void)layoutSubviews #pragma mark-- Fabric specific -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -+ (void)load -{ - [super load]; -} - #pragma mark - RCTComponentViewProtocol - (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index @@ -316,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 9243f204cf..e5e640052d 100644 --- a/ios/RNSScreenContentWrapper.mm +++ b/ios/RNSScreenContentWrapper.mm @@ -183,11 +183,15 @@ - (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 { [super load]; } +#endif // RCT_DYNAMIC_FRAMEWORKS @end diff --git a/ios/RNSScreenFooter.mm b/ios/RNSScreenFooter.mm index 97ac0cdccf..9c6f27973e 100644 --- a/ios/RNSScreenFooter.mm +++ b/ios/RNSScreenFooter.mm @@ -90,12 +90,6 @@ - (void)layoutSubviews // } } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -+ (void)load -{ - [super load]; -} - + (react::ComponentDescriptorProvider)componentDescriptorProvider { return react::concreteComponentDescriptorProvider(); @@ -106,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 2394c6e947..bf43fd6b11 100644 --- a/ios/RNSScreenNavigationContainer.mm +++ b/ios/RNSScreenNavigationContainer.mm @@ -42,11 +42,15 @@ - (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 { [super load]; } +#endif // RCT_DYNAMIC_FRAMEWORKS @end diff --git a/ios/RNSScreenStack.mm b/ios/RNSScreenStack.mm index e2ea05884f..11416f695a 100644 --- a/ios/RNSScreenStack.mm +++ b/ios/RNSScreenStack.mm @@ -181,12 +181,6 @@ @implementation RNSScreenStackView { UIPanGestureRecognizer *_sinkEventsPanGestureRecognizer; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -+ (void)load -{ - [super load]; -} - - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { @@ -1434,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 70a48fb6c2..5970e3e3a6 100644 --- a/ios/RNSScreenStackHeaderConfig.mm +++ b/ios/RNSScreenStackHeaderConfig.mm @@ -62,12 +62,6 @@ @implementation RNSScreenStackHeaderConfig { RCTImageLoader *_imageLoader; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -+ (void)load -{ - [super load]; -} - - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { @@ -1113,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 25b17de62d..15c0da5242 100644 --- a/ios/RNSScreenStackHeaderSubview.mm +++ b/ios/RNSScreenStackHeaderSubview.mm @@ -110,12 +110,6 @@ - (void)layoutSubviews [self updateShadowStateInContextOfAncestorView:[self findNavigationBar]]; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -+ (void)load -{ - [super load]; -} - - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { @@ -299,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 e570363e7b..c78c014141 100644 --- a/ios/RNSSearchBar.mm +++ b/ios/RNSSearchBar.mm @@ -44,12 +44,6 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge #ifdef RCT_NEW_ARCH_ENABLED -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -+ (void)load -{ - [super load]; -} - - (instancetype)init { if (self = [super init]) { @@ -467,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 a53a54940c..52c61c863c 100644 --- a/ios/gamma/scroll-view-marker/RNSScrollViewMarkerComponentView.mm +++ b/ios/gamma/scroll-view-marker/RNSScrollViewMarkerComponentView.mm @@ -254,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 fd3065a23b..721c480be0 100644 --- a/ios/gamma/split/RNSSplitHostComponentView.mm +++ b/ios/gamma/split/RNSSplitHostComponentView.mm @@ -415,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 a554c7cd01..b87738cb35 100644 --- a/ios/gamma/split/RNSSplitScreenComponentView.mm +++ b/ios/gamma/split/RNSSplitScreenComponentView.mm @@ -196,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/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..52209c0cfe 100644 --- a/ios/gamma/stack/screen/RNSStackScreenComponentView.mm +++ b/ios/gamma/stack/screen/RNSStackScreenComponentView.mm @@ -139,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 e984e212a3..1af10b649c 100644 --- a/ios/safe-area/RNSSafeAreaViewComponentView.mm +++ b/ios/safe-area/RNSSafeAreaViewComponentView.mm @@ -25,12 +25,6 @@ @implementation RNSSafeAreaViewComponentView { __weak UIView *_Nullable _providerView; } -// Needed because of this: https://github.com/facebook/react-native/pull/37274 -+ (void)load -{ - [super load]; -} - - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { @@ -153,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 ba231cf55b..47706c4425 100644 --- a/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.mm +++ b/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.mm @@ -174,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 c6e7001505..00fb92142a 100644 --- a/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.mm +++ b/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.mm @@ -109,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 727fb244c5..5abfd295ff 100644 --- a/ios/tabs/host/RNSTabsHostComponentView.mm +++ b/ios/tabs/host/RNSTabsHostComponentView.mm @@ -657,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 7abe5fc8fc..d4a2c7e2db 100644 --- a/ios/tabs/screen/RNSTabsScreenComponentView.mm +++ b/ios/tabs/screen/RNSTabsScreenComponentView.mm @@ -751,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