title: "'undefined' is not an object" from Native Module in React Native
body: <p>I am getting the following error when trying to invoke a method in a Native Module:</p>
  
  <p><code>'undefined' is not an object (evaluating 'ScaleController. updateScaleFromJSON')</code></p>
  
  <p>My native module Objective-C files -</p>
  
  <p>RCTScaleController.h:</p>
  
  <pre><code>#ifndef RCTScaleController_h
  #define RCTScaleController_h
  
  #import "RCTBridgeModule.h"
  
  @interface RCTScaleController : NSObject &lt;RCTBridgeModule&gt;
  @end
  
  #endif /* RCTScaleController_h */
  </code></pre>
  
  <p>RCTScaleController.mm:</p>
  
  <pre><code>#import "RCTScaleController.h"
  #import "ScaleControllerObjC.h"
  #import "RCTLog.h"
  
  @implementation RCTScaleController
  
  RCT_EXPORT_MODULE();
  
  RCT_EXPORT_METHOD(updateScaleFromJSON:(NSString *)jsonString)
  {
      RCTLogInfo(@"About to send json: %@", jsonString);
      ScaleControllerObjC *scaleController = [[ScaleControllerObjC alloc] init];
      [scaleController updateScaleFromJSON:jsonString];
  }
  </code></pre>
  
  <p>Here it is being required in my JS file:</p>
  
  <pre><code>var ScaleController = require('react-native').NativeModules.RCTScaleController;
  </code></pre>
  
  <p>And here it is being invoked causing the error:</p>
  
  <pre><code>ScaleController.updateScaleFromJSON (JSON.stringify (scale));
  </code></pre>
  
  <p>I've followed the examples I've seen and not sure whats wrong here..</p>