tinycreative / react-native-intercom

React Native wrapper for Intercom.io
MIT License
405 stars 279 forks source link

undefined is not an object (evaluating 'IntercomWrapper.registerIdentifiedUser' #28

Closed caalle closed 8 years ago

caalle commented 8 years ago

I'm trying to get the iOS module to work. When running from xcode everything works fine, but when starting using react-native run-ios I get IntercomWrapper is undefined when trying to log events.

  1. I installed intercom-ios manually
    • Added it to embedded frameworks
    • Added custom build phase
  2. npm install react-native-intercom --save
  3. rnpm link react-native-intercom

It is working fine on Android and on iOS when building/running from the xcode interface.

Anyone had a similar issue?

caalle commented 8 years ago

Not really an issue, I had release-scheme set as default. After changing to debug scheme in xcode react-native run-ios is working.

browniefed commented 8 years ago

Thanks for looking into it.

IsTheJack commented 8 years ago

The same issue here. In android version. Any workaround for this problem?

wrozka commented 8 years ago

@IsTheJack I had to register IntercomPackage in MainApplication to fix this error:

 protected List<ReactPackage> getPackages() {                                                  
     return Arrays.<ReactPackage>asList(                                                         
         new MainReactPackage(),                                                                 
         new IntercomPackage()                                                                   
    );                                                                                          
 }