Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
See original GitHub issueThere are warnings on app start:
2018-03-05 21:10:33.505 [warn][tid:main][RCTBridge.m:120] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2018-03-05 21:10:33.505169+0700 AwesomeProject[23617:4551316] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
Environment
Environment:
OS: macOS High Sierra 10.13.3
Node: 9.7.1
Yarn: 1.5.1
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: 0.54.0 => 0.54.0
Expected Behavior
No warnings.
Actual Behavior
There are warnings.
Steps to Reproduce
react-native init AwesomeProject
- Open
ios/AwesomeProject.xcodeproj
- Run the app and look at the output.
- There will be warnings among first several lines.
I’ve tested several versions back (0.49) and the issue is there as well.
Sample project
Issue Analytics
- State:
- Created 6 years ago
- Reactions:44
- Comments:28 (1 by maintainers)
Top Results From Across the Web
React-native: Class RCTCxxModule was not exported. Did ...
I kept getting the error Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE? . I've walked my environment all the ......
Read more >iOS Native Modules
The RCTConvert helper functions all accept a JSON value as input and map it to a native Objective-C type or class. Exporting Constants....
Read more >Troubleshooting common React Native bugs - LogRocket Blog
This troubleshooting guide shares how to easily find and address common React Native bugs. See common error examples.
Read more >How to Bridge an Objective-C View Component - Code Daily
The Manager is also where we setup the module bridge, and declare what sort of ... we call RCT_EXPORT_MODULE() that tells React we...
Read more >iOS custom native module - React Made Native Easy
Let's build the same native module for iOS that we built for Android in the ... Here we are exporting a method getDeviceName()...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@frayhan32 For now it’s not the best solution, but to avoid the warning we can ignore it:
import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings(['Class RCTCxxModule']);
Also seeing this with
react-native 0.55.3
.