Skip to content

Commit 4510b3f

Browse files
author
James Ide
committed
Merge pull request #1701 from paramaggarwal/troubleshooting
Add an 'Xcode Build Failures' section
2 parents e1516f7 + a941537 commit 4510b3f

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

docs/Troubleshooting.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,27 @@ sudo chown -R $USER /usr/local/lib/node_modules
6161

6262
## Debugging in Chrome hangs and/or does not work well
6363
It is possible that one of your Chrome extensions is interacting in unexpected ways with the debugger. If you are having this issue, try disabling all of your extensions and re-enabling them one-by-one until you find the problematic extension.
64+
65+
## Xcode Build Failures
66+
67+
To see the exact error that is causing your build to fail, go into the Issues Navigator in the left sidebar.
68+
69+
##### React libraries missing
70+
If you are using CocoaPods, verify that you have added React along with the subspecs to the `Podfile`. For example, if you were using the `<Text />`, `<Image />` and `fetch()` APIs, you would need to add these in your `Podfile`:
71+
```
72+
pod 'React', :subspecs => [
73+
'RCTText',
74+
'RCTImage',
75+
'RCTNetwork',
76+
'RCTWebSocket',
77+
]
78+
```
79+
Next, make sure you have run `pod install` and that a `Pods/` directory has been created in your project with React installed. CocoaPods will instruct you to use the generated `.xcworkspace` file henceforth to be able to use these installed dependencies.
80+
81+
If you are adding React manually, make sure you have included all the relevant dependencies, like `RCTText.xcodeproj`, `RCTImage.xcodeproj` depending on the ones you are using. Next, the binaries built by these dependencies have to be linked to your app binary. Use the `Linked Frameworks and Binaries` section in the Xcode project settings. More detailed steps are here: [Linking Libraries](https://facebook.github.io/react-native/docs/linking-libraries.html#content).
82+
83+
##### Argument list too long: recursive header expansion failed
84+
85+
In the project's build settings, `User Search Header Paths` and `Header Search Paths` are two configs that specify where Xcode should look for `#import` header files specified in the code. For Pods, CocoaPods uses a default array of specific folders to look in. Verify that this particular config is not overwritten, and that none of the folders configured are too large. If one of the folders is a large folder, Xcode will attempt to recursively search the entire directory and throw above error at some point.
86+
87+
To revert the `User Search Header Paths` and `Header Search Paths` build settings to their defaults set by CocoaPods - select the entry in the Build Settings panel, and hit delete. It will remove the custom override and return to the CocoaPod defaults.

0 commit comments

Comments
 (0)