diff --git a/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewComponentView.mm index c2607ecf61..0a5e9a531d 100644 --- a/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewComponentView.mm @@ -9,6 +9,8 @@ #import #import "RCTARTSurfaceViewComponentDescriptor.h" +#import "FBRCTFabricComponentsPlugins.h" + using namespace facebook::react; @implementation RCTARTSurfaceViewComponentView { @@ -32,3 +34,8 @@ using namespace facebook::react; } @end + +Class RCTARTSurfaceViewCls(void) +{ + return RCTARTSurfaceViewComponentView.class; +} diff --git a/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm index f04e0fe81d..a1eafa6690 100644 --- a/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm @@ -11,6 +11,8 @@ #import #import +#import "FBRCTFabricComponentsPlugins.h" + using namespace facebook::react; static UIActivityIndicatorViewStyle convertActivityIndicatorViewStyle(const ActivityIndicatorViewSize &size) @@ -88,3 +90,8 @@ static UIActivityIndicatorViewStyle convertActivityIndicatorViewStyle(const Acti } @end + +Class RCTActivityIndicatorViewCls(void) +{ + return RCTActivityIndicatorViewComponentView.class; +} diff --git a/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm index 0da7300e45..cb6f3039a5 100644 --- a/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm @@ -13,6 +13,7 @@ #import #import +#import "FBRCTFabricComponentsPlugins.h" #import "RCTConversions.h" #import "RCTFabricModalHostViewController.h" @@ -215,3 +216,8 @@ static ModalHostViewOnOrientationChangeStruct onOrientationChangeStruct(CGRect r } @end + +Class RCTModalHostViewCls(void) +{ + return RCTModalHostViewComponentView.class; +} diff --git a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h index 5aa2adb05c..b6ea5177a1 100644 --- a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h +++ b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h @@ -31,6 +31,13 @@ Class RCTFabricComponentsProvider(const char *name); // Lookup functions Class RCTSafeAreaViewCls(void) __attribute__((used)); Class RCTScrollViewCls(void) __attribute__((used)); +Class RCTPullToRefreshViewCls(void) __attribute__((used)); +Class RCTActivityIndicatorViewCls(void) __attribute__((used)); +Class RCTSliderCls(void) __attribute__((used)); +Class RCTSwitchCls(void) __attribute__((used)); +Class RCTUnimplementedNativeViewCls(void) __attribute__((used)); +Class RCTModalHostViewCls(void) __attribute__((used)); +Class RCTARTSurfaceViewCls(void) __attribute__((used)); #ifdef __cplusplus } diff --git a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm index bace21d2fb..2362f865b6 100644 --- a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm +++ b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm @@ -20,6 +20,13 @@ Class RCTFabricComponentsProvider(const char *name) { static std::unordered_map sFabricComponentsClassMap = { {"SafeAreaView", RCTSafeAreaViewCls}, {"ScrollView", RCTScrollViewCls}, + {"PullToRefreshView", RCTPullToRefreshViewCls}, + {"ActivityIndicatorView", RCTActivityIndicatorViewCls}, + {"Slider", RCTSliderCls}, + {"Switch", RCTSwitchCls}, + {"UnimplementedNativeView", RCTUnimplementedNativeViewCls}, + {"ModalHostView", RCTModalHostViewCls}, + {"ARTSurfaceView", RCTARTSurfaceViewCls}, }; auto p = sFabricComponentsClassMap.find(name); diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm index 6bb0c800e4..d0c1da31f2 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm @@ -16,6 +16,8 @@ #import #import +#import "FBRCTFabricComponentsPlugins.h" + using namespace facebook::react; @interface RCTPullToRefreshViewComponentView () @@ -181,3 +183,8 @@ using namespace facebook::react; } @end + +Class RCTPullToRefreshViewCls(void) +{ + return RCTPullToRefreshViewComponentView.class; +} diff --git a/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm b/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm index 5556c4d07f..084a8522d2 100644 --- a/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm @@ -14,6 +14,8 @@ #import #import +#import "FBRCTFabricComponentsPlugins.h" + using namespace facebook::react; @interface RCTSliderComponentView () @@ -333,3 +335,8 @@ using namespace facebook::react; } @end + +Class RCTSliderCls(void) +{ + return RCTSliderComponentView.class; +} diff --git a/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm b/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm index c6edab447e..4e384bca67 100644 --- a/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm @@ -12,6 +12,8 @@ #import #import +#import "FBRCTFabricComponentsPlugins.h" + using namespace facebook::react; @interface RCTSwitchComponentView () @@ -113,3 +115,8 @@ using namespace facebook::react; } @end + +Class RCTSwitchCls(void) +{ + return RCTSwitchComponentView.class; +} diff --git a/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm index c74f548e69..6f617d0c48 100644 --- a/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm @@ -16,6 +16,8 @@ #import +#import "FBRCTFabricComponentsPlugins.h" + using namespace facebook::react; @implementation RCTUnimplementedViewComponentView { @@ -64,3 +66,8 @@ using namespace facebook::react; } @end + +Class RCTUnimplementedNativeViewCls(void) +{ + return RCTUnimplementedViewComponentView.class; +} diff --git a/React/Fabric/Mounting/RCTComponentViewFactory.mm b/React/Fabric/Mounting/RCTComponentViewFactory.mm index b24727f504..dd1b93da44 100644 --- a/React/Fabric/Mounting/RCTComponentViewFactory.mm +++ b/React/Fabric/Mounting/RCTComponentViewFactory.mm @@ -16,20 +16,14 @@ #import #import -#import "RCTARTSurfaceViewComponentView.h" -#import "RCTActivityIndicatorViewComponentView.h" #import "RCTComponentViewClassDescriptor.h" #import "RCTFabricComponentsPlugins.h" #import "RCTImageComponentView.h" #import "RCTLegacyViewManagerInteropComponentView.h" -#import "RCTModalHostViewComponentView.h" #import "RCTMountingTransactionObserving.h" #import "RCTParagraphComponentView.h" -#import "RCTPullToRefreshViewComponentView.h" #import "RCTRootComponentView.h" -#import "RCTSliderComponentView.h" -#import "RCTSwitchComponentView.h" -#import "RCTUnimplementedNativeComponentView.h" + #import "RCTUnimplementedViewComponentView.h" #import "RCTViewComponentView.h" @@ -47,17 +41,10 @@ using namespace facebook::react; { RCTComponentViewFactory *componentViewFactory = [[RCTComponentViewFactory alloc] init]; - [componentViewFactory registerComponentViewClass:[RCTViewComponentView class]]; [componentViewFactory registerComponentViewClass:[RCTRootComponentView class]]; - [componentViewFactory registerComponentViewClass:[RCTPullToRefreshViewComponentView class]]; + [componentViewFactory registerComponentViewClass:[RCTViewComponentView class]]; [componentViewFactory registerComponentViewClass:[RCTImageComponentView class]]; [componentViewFactory registerComponentViewClass:[RCTParagraphComponentView class]]; - [componentViewFactory registerComponentViewClass:[RCTActivityIndicatorViewComponentView class]]; - [componentViewFactory registerComponentViewClass:[RCTSliderComponentView class]]; - [componentViewFactory registerComponentViewClass:[RCTSwitchComponentView class]]; - [componentViewFactory registerComponentViewClass:[RCTUnimplementedNativeComponentView class]]; - [componentViewFactory registerComponentViewClass:[RCTModalHostViewComponentView class]]; - [componentViewFactory registerComponentViewClass:[RCTARTSurfaceViewComponentView class]]; auto providerRegistry = &componentViewFactory->_providerRegistry;