tinycreative / react-native-intercom

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

Build error "cannot read property unread change notification of undefined" #174

Closed isAlmogK closed 5 years ago

isAlmogK commented 6 years ago

Getting the following build error on iOS, I'm on the latest version of react native, this package and the intercom ios SDK.

screen shot 2018-02-20 at 4 29 09 pm
isAlmogK commented 6 years ago

Anyone have any ideas about this?

Swappdevelopment commented 6 years ago

Hey! Got the same issue and solved it. You need to do the following:

  1. Follow the three steps at this link: https://github.com/intercom/intercom-ios

  2. Open Xcode -> Right click Libraries and select Add File to Project Name -> Select RNIntercom.xcodeproj located in node_modules/react-native-intercom/iOS

  3. Open General Settings -> Build Phases -> Link Binary with Libraries and add libRNIntercom.a

Hope this help!

isAlmogK commented 6 years ago

@Swappdevelopment I did this and now I'm getting No Known class method for selector 'logout' No known class method for selector presentHelpCenter

isAlmogK commented 6 years ago

@Swappdevelopment I was able to fix No Known class method for selector but I'm still getting unread issue

dylanslade commented 6 years ago

@AlmogRnD Did you ever end up solving this?

dylanslade commented 6 years ago

Got it, I needed to add the libRNIntercom.a to the linked frameworks and Libraries section for all of my build targets and use the latest version of the iOS Intercom SDK (currently 5.0.2).

anshul-kai commented 6 years ago

For other looking to solve this, right-click your Libraries folder in Xcode and then "Add files to ". Select RNIntercom.xcodeproj from your <project>/node_modules/react-native-intercom/iOS folder. Then you should be able to easily add the library libRNIntercom.a under Build Phases > Link Binary with Libraries.