react-native: Module RCTLog is not a registered callable module when set dev mode to false on 0.29.0
encounter this red box error on iOS if set dev to false in AppDelegate.m
of UIExplorer sample project.
env: React Native 0.29.0 + iphone 6 (9.3) simulator and device.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 11
- Comments: 18 (8 by maintainers)
I solve this tmp. in index.ios.js, add
var RCTLog = require('RCTLog');
This happens when:
--dev false
option to the packager, which seems to exclude theRCTLog
moduleDebug
configuration, which (by default) defines theDEBUG
macroRCT_DEBUG
macroRCTLog
module to be availableSeeing as all of this happens at compile time and it’s a bit of an edge-case I’m not sure if there’s a simple/good way to detect this in the codebase.
I suggest that, if you do in fact want to test code that is packaged with
--dev false
, you build your app with theRelease
configuration instead. From Xcode, hold down the alt key while clicking the run button and select theRelease
configuration (remember to set it back afterwards).@ide @javache Any other thoughts?
Reverted: https://github.com/facebook/react-native/commit/4b8688926b93a5b41f191cdba78f0f4335a62111
+1
+1
+1
+1
+1