From d9f34bdbb2e1c827db4084ea791908f6b4c50a39 Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Fri, 8 Feb 2019 21:03:31 -0800 Subject: [PATCH] TM iOS: added helper to check whether a class is TurboModule compatible Summary: Similar macro as the existing one, but this one checks for the class directly. Reviewed By: RSNara Differential Revision: D14016664 fbshipit-source-id: aae9a9c1cc95f56d2eff6c9021a714ed4a843db3 --- ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h index 630d0a65a..3312b1f8b 100644 --- a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h +++ b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h @@ -15,7 +15,8 @@ #import #import -#define RCT_IS_TURBO_MODULE_INSTANCE(module) ((RCTTurboModuleEnabled() && [[(module) class] conformsToProtocol:@protocol(RCTTurboModule)])) +#define RCT_IS_TURBO_MODULE_CLASS(klass) ((RCTTurboModuleEnabled() && [(klass) conformsToProtocol:@protocol(RCTTurboModule)])) +#define RCT_IS_TURBO_MODULE_INSTANCE(module) RCT_IS_TURBO_MODULE_CLASS([(module) class]) namespace facebook { namespace react {