React-native: RCTCxxModule incorrectly flagged as not exported module by RCTVerifyAllModulesExported

Created on 3 Jul 2017  路  28Comments  路  Source: facebook/react-native

Is this a bug report?

Yes

Have you read the Bugs section of the Contributing to React Native Guide?

Yes

Environment

  1. react-native -v: 0.45.1 / cli 2.0.1
  2. node -v: v7.9.0
  3. npm -v: 5.0.3
  4. yarn --version (if you use Yarn): 0.24.6

Then, specify:

  1. Target Platform: iOS
  2. Development Operating System: macOS Sierra
  3. Build tools: any supported Xcode version, any supported iOS version

Steps to Reproduce

  1. Execute react-native init testproject
  2. Open the Xcode project and hit run

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:

2017-07-03 11:09:47.963 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-07-03 11:09:47.963285+0200 testproject[467:119661] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?

Reproducible Demo

Any newly created React-Native project using the CxxBridge has this issue.

Possible solution

The RCTVerifyAllModulesExported function uses the objc_copyClassList which also reports the RCTCxxModule. This triggers the warning that this module is not exported, but since the RCTCxxModule 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 the RCTCxxModule 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.

iOS Locked

Most helpful comment

this issue puzzle me a lot.
My project ran smoothly days before, however this issue happens today, and this issue appears in every project inited by react-native-cli without any modification .

All 28 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
2017-09-04 14:30:55.610 [info][tid:main][RCTCxxBridge.mm:188] Initializing (parent: , executor: (null))
2017-09-04 14:30:55.644 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-09-04 14:30:55.669 [info][tid:main][RCTRootView.m:301] Running application ExampleProject ({
initialProps = {
};
rootTag = 1;
})
2017-09-04 14:30:57.471 ExampleProject[10735:97004] -[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa303938303930327
2017-09-04 14:30:57.474 ExampleProject[10735:97004] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa303938303930327'
*
First throw call stack:
(
0 CoreFoundation 0x000000010a193d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010901721e objc_exception_throw + 48
2 CoreFoundation 0x000000010a203f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010a119005 ___forwarding___ + 1013
4 CoreFoundation 0x000000010a118b88 _CF_forwarding_prep_0 + 120
5 ExampleProject 0x000000010841bd54 -[RCTMultipartStreamReader emitProgress:contentLength:final:callback:] + 244
6 ExampleProject 0x000000010841c54a -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1610
7 ExampleProject 0x000000010846b8bc -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 444
8 CFNetwork 0x0000000109bd4352 __88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke + 51
9 Foundation 0x0000000108b199ad __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
10 Foundation 0x0000000108b1968f -[NSBlockOperation main] + 101
11 Foundation 0x0000000108b17d8c -[__NSOperationInternal _start:] + 672
12 Foundation 0x0000000108b13ccf __NSOQSchedule_f + 201
13 libdispatch.dylib 0x000000010de0a0cd _dispatch_client_callout + 8
14 libdispatch.dylib 0x000000010dde7e17 _dispatch_queue_serial_drain + 236
15 libdispatch.dylib 0x000000010dde8b4b _dispatch_queue_invoke + 1073
16 libdispatch.dylib 0x000000010ddeb385 _dispatch_root_queue_drain + 720
17 libdispatch.dylib 0x000000010ddeb059 _dispatch_worker_thread3 + 123
18 libsystem_pthread.dylib 0x000000010e1b9712 _pthread_wqthread + 1299
19 libsystem_pthread.dylib 0x000000010e1b91ed start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Looks like an unrelated issue with NSTaggedPointerString to me. The warning you get above it is harmless, you probably have another issue.

@TheRemjx01 You probably have something like:

NSNumber *aString = dictionary[@"key"];
[aString unsignedIntValue];

Basically, you are assigning a value with type id as an NSNumber, and using NSNumber APIs, when in fact, it's an NSString object, which doesn't support NSNumber selectors.

@Mazyod Thanks for your reply.
Actually, I haven't do anything, just create app with react-native-cli then run on xCode and got those errors.
However, I have changed from react-native-cli to CRNA. Everything work fine

+1 same issue

Same issue

+1 Same issue.

Oct  8 20:45:27  Frills[11429] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Oct  8 20:45:27  Frills[11429] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Oct  8 20:45:27  Frills[11429] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
2017-10-08 15:15:27.943 [info][tid:main][RCTCxxBridge.mm:187] Initializing <RCTCxxBridge: 0x7fb99d4c65e0> (parent: <RCTBridge: 0x7fb99d75f610>, executor: (null))
2017-10-08 15:15:27.954 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-08 20:45:28.050 Frills[11429] <Warning> [Firebase/Analytics][I-ACS005000] The AdSupport Framework is not currently linked. Some features will not function properly. Learn more at http://goo.gl/9vSsPb
2017-10-08 20:45:28.064 Frills[11429] <Notice> [Firebase/Analytics][I-ACS023007] Firebase Analytics v.4000000 started
2017-10-08 20:45:28.067 Frills[11429] <Notice> [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2017-10-08 20:45:28.121 Frills[11429] <Notice> [Firebase/Analytics][I-ACS003007] Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2017-10-08 20:45:29.278 Frills[11429] <Notice> [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-10-08 15:15:31.255 [warn][tid:main][RCTEventEmitter.m:54] Sending `FCMTokenRefreshed` with no listeners registered.
2017-10-08 20:45:34.081 Frills[11429] <Warning> [Firebase/Analytics][I-ACS032003] iAd framework is not linked. Search Ad Attribution Reporter is disabled.
2017-10-08 20:45:34.084 Frills[11429] <Notice> [Firebase/Analytics][I-ACS023012] Firebase Analytics enabled

I'm getting the same issue, just everythings fails to export.

2017-10-11 20:21:02.159 [info][tid:main][RCTCxxBridge.mm:187] Initializing <RCTCxxBridge: 0x6040007b4c80> (parent: <RCTBridge: 0x6040000b45e0>, executor: (null))
2017-10-11 20:21:02.232 [warn][tid:main][RCTBridge.m:121] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.247 [warn][tid:main][RCTBridge.m:121] Class RNVectorIconsManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.247 [warn][tid:main][RCTBridge.m:121] Class RCTWebSocketExecutor was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.247 [warn][tid:main][RCTBridge.m:121] Class RCTVibration was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.247 [warn][tid:main][RCTBridge.m:121] Class RCTUIManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.247 [warn][tid:main][RCTBridge.m:121] Class RCTTiming was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.248 [warn][tid:main][RCTBridge.m:121] Class RCTSourceCode was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.248 [warn][tid:main][RCTBridge.m:121] Class RCTSettingsManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.248 [warn][tid:main][RCTBridge.m:121] Class RCTRedBox was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.248 [warn][tid:main][RCTBridge.m:121] Class RCTPlatform was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.248 [warn][tid:main][RCTBridge.m:121] Class RCTPhotoLibraryImageLoader was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.248 [warn][tid:main][RCTBridge.m:121] Class RCTPerfMonitor was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.248 [warn][tid:main][RCTBridge.m:121] Class RCTLocalAssetImageLoader was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.249 [warn][tid:main][RCTBridge.m:121] Class RCTJSCSamplingProfiler was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.249 [warn][tid:main][RCTBridge.m:121] Class RCTJSCExecutor was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.249 [warn][tid:main][RCTBridge.m:121] Class RCTImageStoreManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.249 [warn][tid:main][RCTBridge.m:121] Class RCTImagePickerManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.249 [warn][tid:main][RCTBridge.m:121] Class RCTImageLoader was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.249 [warn][tid:main][RCTBridge.m:121] Class RCTImageEditingManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.249 [warn][tid:main][RCTBridge.m:121] Class RCTI18nManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.249 [warn][tid:main][RCTBridge.m:121] Class RCTHTTPRequestHandler was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.250 [warn][tid:main][RCTBridge.m:121] Class RCTGIFImageDecoder was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.250 [warn][tid:main][RCTBridge.m:121] Class RCTFileRequestHandler was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.250 [warn][tid:main][RCTBridge.m:121] Class RCTExceptionsManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.250 [warn][tid:main][RCTBridge.m:121] Class RCTEventDispatcher was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.250 [warn][tid:main][RCTBridge.m:121] Class RCTDevSettings was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.250 [warn][tid:main][RCTBridge.m:121] Class RCTDevMenu was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.251 [warn][tid:main][RCTBridge.m:121] Class RCTDevLoadingView was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.251 [warn][tid:main][RCTBridge.m:121] Class RCTDeviceInfo was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.251 [warn][tid:main][RCTBridge.m:121] Class RCTDataRequestHandler was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.251 [warn][tid:main][RCTBridge.m:121] Class RCTClipboard was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.251 [warn][tid:main][RCTBridge.m:121] Class RCTCameraRollManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.251 [warn][tid:main][RCTBridge.m:121] Class RCTBlobManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.251 [warn][tid:main][RCTBridge.m:121] Class RCTAsyncLocalStorage was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.251 [warn][tid:main][RCTBridge.m:121] Class RCTAssetsLibraryRequestHandler was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.252 [warn][tid:main][RCTBridge.m:121] Class RCTEventEmitter was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.252 [warn][tid:main][RCTBridge.m:121] Class RCTWebSocketModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.252 [warn][tid:main][RCTBridge.m:121] Class RCTTVNavigationEventEmitter was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.252 [warn][tid:main][RCTBridge.m:121] Class RCTStatusBarManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.252 [warn][tid:main][RCTBridge.m:121] Class RCTPushNotificationManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.252 [warn][tid:main][RCTBridge.m:121] Class RCTNetworking was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.252 [warn][tid:main][RCTBridge.m:121] Class RCTNetInfo was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.252 [warn][tid:main][RCTBridge.m:121] Class RCTLocationObserver was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.252 [warn][tid:main][RCTBridge.m:121] Class RCTLinkingManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.252 [warn][tid:main][RCTBridge.m:121] Class RCTKeyboardObserver was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.253 [warn][tid:main][RCTBridge.m:121] Class RCTAppState was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.253 [warn][tid:main][RCTBridge.m:121] Class RCTAlertManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.253 [warn][tid:main][RCTBridge.m:121] Class RCTActionSheetManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.253 [warn][tid:main][RCTBridge.m:121] Class RCTAccessibilityManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.253 [warn][tid:main][RCTBridge.m:121] Class RCTViewManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.253 [warn][tid:main][RCTBridge.m:121] Class RCTWebViewManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.254 [warn][tid:main][RCTBridge.m:121] Class RCTTextViewManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.254 [warn][tid:main][RCTBridge.m:121] Class RCTTextManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.254 [warn][tid:main][RCTBridge.m:121] Class RCTTextFieldManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.254 [warn][tid:main][RCTBridge.m:121] Class RCTTabBarManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.254 [warn][tid:main][RCTBridge.m:121] Class RCTTabBarItemManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.254 [warn][tid:main][RCTBridge.m:121] Class RCTSwitchManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.255 [warn][tid:main][RCTBridge.m:121] Class RCTSliderManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.255 [warn][tid:main][RCTBridge.m:121] Class RCTSegmentedControlManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.255 [warn][tid:main][RCTBridge.m:121] Class RCTScrollViewManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.255 [warn][tid:main][RCTBridge.m:121] Class RCTScrollContentViewManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.255 [warn][tid:main][RCTBridge.m:121] Class RCTRefreshControlManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.255 [warn][tid:main][RCTBridge.m:121] Class RCTRawTextManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.255 [warn][tid:main][RCTBridge.m:121] Class RCTProgressViewManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.255 [warn][tid:main][RCTBridge.m:121] Class RCTPickerManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.255 [warn][tid:main][RCTBridge.m:121] Class RCTNavItemManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.256 [warn][tid:main][RCTBridge.m:121] Class RCTNavigatorManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.256 [warn][tid:main][RCTBridge.m:121] Class RCTModalHostViewManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.256 [warn][tid:main][RCTBridge.m:121] Class RCTMaskedViewManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.256 [warn][tid:main][RCTBridge.m:121] Class RCTImageViewManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.256 [warn][tid:main][RCTBridge.m:121] Class RCTDatePickerManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.256 [warn][tid:main][RCTBridge.m:121] Class RCTActivityIndicatorViewManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.256 [warn][tid:main][RCTBridge.m:121] Class ARTSurfaceViewManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.263 [warn][tid:main][RCTBridge.m:121] Class ARTNodeManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.263 [warn][tid:main][RCTBridge.m:121] Class ARTRenderableManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.264 [warn][tid:main][RCTBridge.m:121] Class ARTTextManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.264 [warn][tid:main][RCTBridge.m:121] Class ARTShapeManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-11 20:21:02.264 [warn][tid:main][RCTBridge.m:121] Class ARTGroupManager was not exported. Did you forget to use RCT_EXPORT_MODULE()?

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 React to the Target Dependencies.

In xcode > Build Phases > Target Dependencies > + > React > React

same to me

That npm v5.x.x sometimes removes packages while installing another one (very annoying bug, probably because we use npm i --save module, and npm v5 doesn't need --save flag).
Also the error "Native module cannot be null." happened to me the moment i changed the Bundle Identifier, i tried to clean build, clean DeriveData dir, npm start -- --reset-cache. I checked all modules where linked correctly.

In xcode console logs it has this particular row:
Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?

Right now it looks to me more like a warning :/

I solved this by making sure that NSAppTrasnportSecurity key in my info.plist had the correct values:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSAllowsArbitraryLoadsInWebContent</key>
    <true/>
    <key>NSAllowsLocalNetworking</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict/>
</dict>

@warrenronsiek thanks,
can you add a screenshot of info.plist opened in the info plist editor? I'm new on Max and I'm not able to understand where to insert these lines

Can it be ok like this?

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSAllowsArbitraryLoadsInWebContent</key>
    <true/>
    <key>NSAllowsLocalNetworking</key>
    <true/>
    <key>NSExceptionDomains</key>
        <dict>
            <key>localhost</key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
            </dict>
        </dict>
</dict>

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.
My project ran smoothly days before, however this issue happens today, and this issue appears in every project inited by react-native-cli without any modification .

Looks related to #18201.

The same like @hobo214

Adding -ObjC under Build Settings > Other Linker Flags solved this for me.
My issue was that the app crashed on start with error message:
Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?

@davidfant This -Objc Setting is default. So my waring still there.

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.

@yeomann this was fixed in https://github.com/facebook/react-native/commit/569061dd8384a86cd27719b8b068360d8379f4c3, can you confirm this is still an issue in master?

@hramos Hi, yup it came suddenly. particularly appeared after installing react-native-keychain although I'm refactoring a lot of logic in auth and on init of application, so sometimes it comes, sometimes it doesn't show. so, I have no idea how and what is causing this to appear. maybe bcz I am exporting async functions in action creator? ... I have no idea!

UPDATE: I just linked a library after installing a package from npm and pod install after this I see the warning again. Hope this will help.

screen shot 2018-07-16 at 23 11 02

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.

Was this page helpful?
0 / 5 - 0 ratings