Skip to content

Commit

Permalink
TM iOS: added helper to check whether a class is TurboModule compatible
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fkgozali authored and facebook-github-bot committed Feb 9, 2019
1 parent 21290b5 commit d9f34bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#import <jsireact/JSCallInvoker.h>
#import <jsireact/TurboModule.h>

#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 {
Expand Down

0 comments on commit d9f34bd

Please sign in to comment.