Uh oh!
There was an error while loading. Please reload this page.
Silence warning "Class RCTCxxModule was not exported" - #19794
Silence warning "Class RCTCxxModule was not exported"#19794chrisballinger wants to merge 1 commit into
Conversation
facebook-github-bot
commented
Jun 19, 2018
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
douglowder
commented
Jun 22, 2018
@shergin I'm hitting this also... is the fix in this PR ok, or should this class name be filtered out in e.g. if (isModuleSuperClass) {
break;
}
++ if (strncmp(class_getName(superclass), "RCTCxxModule", strlen("RCTCxxModule")) == 0) {+ break;+ }
RCTLogWarn(@"Class %@ was not exported. Did you forget to use RCT_EXPORT_MODULE()?", cls);
break; |
javache
commented
Jun 25, 2018
Yes, the module should not be exported. Instead the module should be ignored in RCTVerifyAllModulesExported. |
douglowder
left a comment
There was a problem hiding this comment.
@chrisballinger This module should not be exported. See @javache 's comment, and the code snippet I provided that fixes the issue in a safer way.
douglowder
commented
Jun 25, 2018
@chrisballinger thanks for submitting this PR -- I've implemented the alternative fix requested by @javache in a separate PR and will get that merged as soon as CI passes. |
chrisballinger
commented
Jun 26, 2018
@dlowder-salesforce @javache Awesome thanks! |
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
kaykaul
commented
Jun 28, 2018
@chrisballinger @dlowder-salesforce @javache |
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
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
Test Plan
Try a fresh project by following the RN iOS tutorial, and observe that there are no more warnings after making this change.
Release Notes
[IOS] [MINOR] [CxxBridge] - Fix "Class RCTCxxModule was not exported"