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.

simulator screen shot jul 8 2016 12 59 10 pm

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 11
  • Comments: 18 (8 by maintainers)

Most upvoted comments

I solve this tmp. in index.ios.js, add

var RCTLog = require('RCTLog');

This happens when:

Seeing 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 the Release configuration instead. From Xcode, hold down the alt key while clicking the run button and select the Release configuration (remember to set it back afterwards).

@ide @javache Any other thoughts?

+1