-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don’t hard-code CocoaPods’s sandbox path #32243
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The `Pods` directory may not be in the current working directory, for example, when calling `pod install` with `--project-directory=ios`.
facebook-github-bot
added
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Shared with Meta
Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
labels
Sep 21, 2021
Base commit: 6025611 |
Base commit: 6025611 |
30 tasks
@mikehardy @sonicdoe Thanks so much! This PR has been brought to our team’s attention and we’ll make sure to incorporate it in 0.66. |
@fkgozali has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
fkgozali
pushed a commit
that referenced
this pull request
Sep 23, 2021
Summary: When running `scripts/react_native_pods.rb`, the `Pods` directory may not be in the current working directory, for example, when calling [`pod install`](https://guides.cocoapods.org/terminal/commands.html#pod_install) with `--project-directory=ios`. Therefore, `sed` fails and, ultimately, the build fails. References: * https://rubydoc.info/gems/cocoapods/Pod%2FInstaller:sandbox * https://rubydoc.info/gems/cocoapods/Pod/Sandbox#root-instance_method ## Changelog [iOS] [Fixed] - Fix build error after running `pod install` with `--project-directory=ios` Pull Request resolved: #32243 Test Plan: 1. `npx react-native init AwesomeProject --version 0.66.0-rc.3 --skip-install` 2. `cd AwesomeProject` 3. `yarn install` 4. `pod install --project-directory=ios` This command prints “sed: Pods/RCT-Folly/folly/portability/Time.h: No such file or directory” but still exits with 0. 5. `npx react-native run-ios` The build fails because of “typedef redefinition with different types” as described in facebook/flipper#834. 6. Apply this patch using `(cd node_modules/react-native && curl https://github.com/kontist/react-native/commit/ec330f756e477e53dde891fe02fd74916d9faef0.patch | patch -p1)` 7. Re-run `pod install --project-directory=ios` 8. Re-run `npx react-native run-ios` The iOS app should now run successfully. Reviewed By: sota000 Differential Revision: D31089656 Pulled By: fkgozali fbshipit-source-id: 431898bed88f68761c7e0e6c79074dc04f43ed23
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Merged
This PR has been merged.
Needs: React Native Team Attention
Shared with Meta
Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
When running
scripts/react_native_pods.rb
, thePods
directory may not be in the current working directory, for example, when callingpod install
with--project-directory=ios
. Therefore,sed
fails and, ultimately, the build fails.Changelog
[iOS] [Fixed] - Fix build error after running
pod install
with--project-directory=ios
Test Plan
npx react-native init AwesomeProject --version 0.66.0-rc.3 --skip-install
cd AwesomeProject
yarn install
pod install --project-directory=ios
This command prints “sed: Pods/RCT-Folly/folly/portability/Time.h: No such file or directory” but still exits with 0.
npx react-native run-ios
The build fails because of “typedef redefinition with different types” as described in facebook/flipper#834.
(cd node_modules/react-native && curl https://github.com/kontist/react-native/commit/ec330f756e477e53dde891fe02fd74916d9faef0.patch | patch -p1)
pod install --project-directory=ios
npx react-native run-ios
The iOS app should now run successfully.