From 33b600236a477ee7fc758cb1726f65bb3badcbb1 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Thu, 4 Feb 2021 03:43:03 -0800 Subject: [PATCH] Simplify ModalHostView plugin setup Summary: Changelog: [internal] Provide a default plugin function that provides core `RCTModalHostViewComponentView`. This makes for easier setup for standalone app migration. Reviewed By: JoshuaGross, shergin Differential Revision: D26150091 fbshipit-source-id: d39723b99c590d1a33fb7b628f809aa12b2f7589 --- .../Modal/RCTModalHostViewComponentView.mm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm index cdbb147bba3..6e24d39105e 100644 --- a/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm @@ -256,3 +256,19 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct( } @end + +#ifdef __cplusplus +extern "C" { +#endif + +// Can't the import generated Plugin.h because plugins are not in this BUCK target +Class RCTModalHostViewCls(void); + +#ifdef __cplusplus +} +#endif + +Class RCTModalHostViewCls(void) +{ + return RCTModalHostViewComponentView.class; +}