I'm receiving the following message when try to build my project
Argument list too long: recursive header expansion failed at /Users/my-project/node_modules/react-native-intercom/iOS/../../../ios/Pods/React/node_modules/react-tools/src/renderers/dom/shared.
I'm trying to link the project manually
Any ideas?
Thank you in advanced
@ferbass Any idea why you closed this? I'm trying to integrate this library right now and I'm coming up with the same error.
Thanks
@zibs wow maybe i close it by mistake, i can't solve my problem
Installing Intercom SDK through pod Intercom(as listed here) instead of pod 'react-native-intercom', :path => '../node_modules/react-native-intercom' solves this problem.
PS - This involves manually linking the library(as listed here) .
@zibs might be useful to add this to the installation instructions. I suppose pod react-native-intercom downloads the full RN wrapper into Pods making the recursive header expansion throw up.
I had a similar problem with react-native-camera, and to fix it i just removed the library from 'Link Binary With Libraries` then added it again.
just shorten the project path/name, and it works for me!
It looks like this library recursively searches through $(SRCROOT)/../../../ios (recursive) by default, which can contain a ton of files. Changing the Framework Search Path to $(SRCROOT)/../../../ios/Pods (recursive) solves the problem for me.
And here's what my Framework Search Paths look like, post-fix:

FYI, it was my DerivedData folder that was making my arguments list blow up. If I manually nuked that and then did a build it would work fine, but once that folder existed (and it's got many, many files in it) builds would fail as well as cleans with an error message like @ferbass had originally.
@holmesal I had the same issue. I had moved my DerivedData folder to be relative the project root in the Preferences->Locations. It allowed me to easily find and blow out the folder. However, when I moved it back to Default, everything worked.

Fixed:

This issue can happen with other dependencies depending on your configuration.
Fwiw this commit solved the same error in a similar library:
I get the same error in iOS (using Pod). Is there any fix on the library itself or we need to try these fixes one by one? Thanks!
@holmesal I added the Pods text at Framework Search Path but it did not work.
I get an error for a different file than the OP (@ferbass) mentioned:
It fails at ../../../ios/Pods/React/node_modules/repeat-element with Argument list too long
Actually, I removed the Pod of react-native-camera and the compile succeeded. Could it be because react-native-camera pod has React also as a dependency? If yes, how can this solved? Thanks for any help. So strange that I look here for Intercom problems that are related to another Pod.
I have follow all the instruction given in (as listed https://github.com/intercom/intercom-ios#cocoapods)
I am facing this issue in build
Argument list too long: recursive header expansion failed at ../node_modules/react-native-intercom/iOS/../../../ios/Pods/React/node_modules/is-buffer.
Argument list too long: recursive header expansion failed at ../node_modules/react-native-intercom/iOS/../../../ios/Pods/React/node_modules/seek-bzip/bin.
failed: No suchfile or directory
No such file or directory
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/$(MY_APP.app)/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Anyone can suggest any solution that will be help
works for me
That PR was merged in March, but another one added back the ios/** path and broke it again:
https://github.com/tinycreative/react-native-intercom/pull/219
@browniefed I can make a PR to remove the ios/** path, but someone else apparently wants it in. I installed Intercom iOS manually.
@peacechen Can you please make that PR again and write a description (and link to this issue) why this is really needed?
Maybe the person that took it out was not aware of this problem.
Thanks!
There's been a lot of back & forth on the framework search paths and creating another PR will just continue that cycle. The problems stem from conflicting path requirements for manual linking vs pods.
However that broke manual linking, so #219 reverted that. That's puzzling because in my case I manually linked and the latest reversion doesn't work.
One fix only works for some cases but breaks it for others. Vice versa for the other fix. I'm starting to suspect that different versions of Xcode or RN may handle this differently.
Removing the ios/build directory fixed it for me:
https://github.com/react-native-community/react-native-camera/issues/1407#issuecomment-376905085
Sometimes this failed, so we had to update RNIntercom.xcodeproj in xcode:
"YourProj -> Libraries -> RNIntercom.xcodeproj -> build settings -> search paths -> framework search paths:

Tried everything and nothing works for me :(

Most helpful comment
It looks like this library recursively searches through
$(SRCROOT)/../../../ios (recursive)by default, which can contain a ton of files. Changing the Framework Search Path to$(SRCROOT)/../../../ios/Pods (recursive)solves the problem for me.Here's the line of code.
And here's what my Framework Search Paths look like, post-fix:
FYI, it was my DerivedData folder that was making my arguments list blow up. If I manually nuked that and then did a build it would work fine, but once that folder existed (and it's got many, many files in it) builds would fail as well as cleans with an error message like @ferbass had originally.