-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RCTCxxModule incorrectly flagged as not exported module by RCTVerifyAllModulesExported #14806
Comments
I stucked at this issue now. Any solution? |
This issue described a warning logged to the Xcode console. It's annoying and a bit confusing, but you can just ignore it. It's not a compile error or other workflow blocking issue. @TheRemjx01 maybe you can explain how you are "stuck" at this issue? |
My App Freeze then |
Looks like an unrelated issue with |
@TheRemjx01 You probably have something like: NSNumber *aString = dictionary[@"key"];
[aString unsignedIntValue]; Basically, you are assigning a value with type |
@Mazyod Thanks for your reply. |
+1 same issue |
Same issue |
+1 Same issue.
|
This comment has been minimized.
This comment has been minimized.
Anyone find a solution to this? |
Any solutions ? |
Now it's already a month ago, so not really sure how I fixed it. But I think it was by adding In xcode > Build Phases > Target Dependencies > + > React > React |
same to me |
That In xcode console logs it has this particular row: Right now it looks to me more like a warning :/ |
I solved this by making sure that
|
@warrenronsiek thanks, Can it be ok like this?
Anyway, adding these lines didn't stop warning about RCTCxxModule not exported |
@realaboo, your info.plist should work. Seems like something else is going wrong. |
+1 same issue |
this issue puzzle me a lot. |
Looks related to #18201. |
The same like @hobo214 |
Adding |
@davidfant This |
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 facebook#14806 . This supersedes PR facebook#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 facebook#19880 Differential Revision: D8653809 Pulled By: hramos fbshipit-source-id: c48529c2d74ddd40a90bc0e06e405078e25b72e3
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
issue is still there, this just suddenly pops up after so many days development. Sadly the issue is closed on both of Github link where they are saying its duplicate. |
@hramos Hi, yup it came suddenly. particularly appeared after installing UPDATE: I just linked a library after installing a package from npm and |
In that case, please open a new issue. As far as we are aware, this is fixed in master, so it would be useful to get a brand new report with your specifics. |
Is this a bug report?
Yes
Have you read the Bugs section of the Contributing to React Native Guide?
Yes
Environment
react-native -v
: 0.45.1 / cli 2.0.1node -v
: v7.9.0npm -v
: 5.0.3yarn --version
(if you use Yarn): 0.24.6Then, specify:
Steps to Reproduce
react-native init testproject
Expected Behavior
No warnings should be logged to the Xcode console since we have the default setup.
Actual Behavior
In the Xcode log there is a warning about the
RCTCxxModule
not being exported:Reproducible Demo
Any newly created React-Native project using the CxxBridge has this issue.
Possible solution
The
RCTVerifyAllModulesExported
function uses theobjc_copyClassList
which also reports theRCTCxxModule
. This triggers the warning that this module is not exported, but since theRCTCxxModule
is merely a base class that can be used by real module implementation this is a false positive.A possible solution would be to make an exception in
RCTVerifyAllModulesExported
for theRCTCxxModule
so it will not be checked and the warning will not be produced.Note: The warning will disappear when you create a module that subclasses
RCTCxxModule
since there is a check in place for that scenario. As long as there is no subclass yet this warning will pop up.The text was updated successfully, but these errors were encountered: