Skip to content

Commit 569061d

Browse files
douglowderfacebook-github-bot
authored andcommitted
Suppress spurious warning about RCTCxxModule (#19880)
Summary: <!-- Required: Write your motivation here. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. --> 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 #19880 Differential Revision: D8653809 Pulled By: hramos fbshipit-source-id: c48529c2d74ddd40a90bc0e06e405078e25b72e3
1 parent bfea0e5 commit 569061d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

React/Base/RCTBridge.m

+3
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ void RCTVerifyAllModulesExported(NSArray *extraModules)
106106

107107
for (unsigned int i = 0; i < classCount; i++) {
108108
Class cls = classes[i];
109+
if (strncmp(class_getName(cls), "RCTCxxModule", strlen("RCTCxxModule")) == 0) {
110+
continue;
111+
}
109112
Class superclass = cls;
110113
while (superclass) {
111114
if (class_conformsToProtocol(superclass, @protocol(RCTBridgeModule))) {

0 commit comments

Comments
 (0)