From 569061dd8384a86cd27719b8b068360d8379f4c3 Mon Sep 17 00:00:00 2001 From: Douglas Date: Tue, 26 Jun 2018 17:38:09 -0700 Subject: [PATCH] Suppress spurious warning about RCTCxxModule (#19880) Summary: On a relatively stock / default setup of RN on iOS you'll see the warning "Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?" pop up on every launch. This change resolves that issue. Fixes #14806 . This supersedes PR #19794 . Try a fresh project by following the RN iOS tutorial, and observe that there are no more warnings after making this change. [IOS] [MINOR] [CxxBridge] - Fix "Class RCTCxxModule was not exported" Closes https://github.com/facebook/react-native/pull/19880 Differential Revision: D8653809 Pulled By: hramos fbshipit-source-id: c48529c2d74ddd40a90bc0e06e405078e25b72e3 --- React/Base/RCTBridge.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/React/Base/RCTBridge.m b/React/Base/RCTBridge.m index f62074723c584c..acfc09dd376c60 100644 --- a/React/Base/RCTBridge.m +++ b/React/Base/RCTBridge.m @@ -106,6 +106,9 @@ void RCTVerifyAllModulesExported(NSArray *extraModules) for (unsigned int i = 0; i < classCount; i++) { Class cls = classes[i]; + if (strncmp(class_getName(cls), "RCTCxxModule", strlen("RCTCxxModule")) == 0) { + continue; + } Class superclass = cls; while (superclass) { if (class_conformsToProtocol(superclass, @protocol(RCTBridgeModule))) {