react-native-intercom: Readme instructions for iOS doesn't work
The current installation instructions for iOS in the README suggests installing the package, then linking it with react-native link, and finally adding
pod 'react-native-intercom', :path => '../node_modules/react-native-intercom'
to your Cocoapods Podfile. This does not work. It leads to RCTBridgeModule.h not found errors on IntercomWrapper.h when building your project.
I’m not an expert in Cocoapods but I suspect the reason why the README suggests adding react-native-intercom to the Podfile is so that the podspec can add Intercom official pod as a dependency. However that same podspec also tells xcode to build all the iOS source code for this library.
In other words, the iOS source code for react-native-intercom is being added to the project twice, by react-native link and by Cocoapods. The cocoapods one fails because it can’t find the RCT* header files.
What worked for us on a blank new project was to:
yarn add react-native-intercomreact-native link react-native-intercom- Add
pod 'Intercom', '> 3'to your Podfile. This only adds the source code for the Intercom’s official ios library, and not the the code for react-native-intercom which is already linked to our project.
If one of the maintainers of the project could confirm these guesses are correct I’ll be happy to send a PR for the readme 😃.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 18 (2 by maintainers)
@bsjaffer With https://github.com/tinycreative/react-native-intercom/pull/162, you can now place
Intercom.frameworkin the following folder~/Documents/Intercom. It works for me 😊@javiercr @afilp anyone found the solution for this ?
Thanks @seanadkinson. Tried again fresh branch and using pod method instead. Still get this when building from command line.
And I get this error in xcode: ld: framework not found Intercom clang: error: linker command failed with exit code 1 (use -v to see invocation)