Browse files

Suppress spurious warning about RCTCxxModule (#19880)

  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
  • Loading branch information...
dlowder-salesforce authored and hramos committed Jun 27, 2018
1 parent 302699a commit af76473c2e344c13ecac054b5a5568a0b94128e5
Showing with 3 additions and 0 deletions.
  1. +3 −0 React/Base/RCTBridge.m
@@ -98,6 +98,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) {
Class superclass = cls;
while (superclass) {
if (class_conformsToProtocol(superclass, @protocol(RCTBridgeModule))) {

0 comments on commit af76473

Please sign in to comment.