From 3e9f9cfe4753f3d2c542ea93fa4077471e034e9d Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Wed, 6 Feb 2019 15:55:49 -0800 Subject: [PATCH] TM iOS: Util to check if an id is TurboModule instance Summary: Simple macro to do check if TurboModule is enabled and the particular object is RCTTurboModule compliant. Reviewed By: PeteTheHeat Differential Revision: D13978368 fbshipit-source-id: 660c7cab7bb074d80d57abead951dad19306ae73 --- ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h index 8a957a069..630d0a65a 100644 --- a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h +++ b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h @@ -15,6 +15,8 @@ #import #import +#define RCT_IS_TURBO_MODULE_INSTANCE(module) ((RCTTurboModuleEnabled() && [[(module) class] conformsToProtocol:@protocol(RCTTurboModule)])) + namespace facebook { namespace react {