-
Notifications
You must be signed in to change notification settings - Fork 4.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
Use brew install cocoapods
instead of arch -x86_64 pod install
on M1 MacBook
#3003
Comments
@cipolleschi What's your take here?
IMHO relying on brew for this sounds "risky", mostly because we have the |
Summary: This Diff updates the RNTester README to support Mac M1 laptops. ## Changelog [General][Changed] - Updated `rn-tester/README.md` to include instructions for Mac M1 users Reviewed By: cortinico Differential Revision: D34376951 fbshipit-source-id: 7195bddefb6e202261fef9b5f5225484c506fd9b
Could the instructions be for an older version of ffi? Afaik ffi supports arm64. It seems to me that those steps are no longer required and installing via bundler should just be it. |
Hi everyone! I propose that we update the doc for M1 users specifying that, if they encounter issues, they should update the |
Seems great to me 👍 |
@danilobuerger @cipolleschi the Apple ARM CPU patch on You can find your (Make sure you are using system Ruby before running this script.) ruby -e 'require "rbconfig"; pp RbConfig::CONFIG' | grep "host" My result: "host_os"=>"darwin21",
"host_vendor"=>"apple",
"host_cpu"=>"x86_64",
"host"=>"x86_64-apple-darwin21",
"host_alias"=>"", |
Starting with rn 0.68, we are expecting a ruby version of 2.7.4 as set in the Gemfile and .ruby-version. Thats not the ruby shipped from apple anyway. |
@danilobuerger Hmm... then we'll need to modify these paragraphs later. https://reactnative.dev/docs/environment-setup#cocoapods
|
That's correct. The recommendation would be to use bundler in the near future as it allows us to reduce the variability of ruby/cocoapods versions. The new app template comes with all the necessary files in place and the docs should be updated to reflect this. |
Thanks for the detailed explanation! I close this issue as it will be resolved in the near future. |
- vision-camera-code-scanner depends on react-native-reanimated - Followed this guide https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/ - Moved react-native-gesture-handler and react-native-reanimated from devDependencies to dependencies - Enabled hermes on Android - (environment) Installed rvm using https://rvm.io/rvm/install - Installed gpg with `brew install gnupg` - Installed ruby 2.7.4 as required by Gemfile using rvm - Uninstalled cocoapods using `sudo gem uninstall cocoapods` - Installed cocoapods using `bundle install` as recommended by this issue comment facebook/react-native-website#3003 (comment) - Updated gitignore to ignore bundled vendor files as recommended here https://github.com/facebook/react-native/blob/main/.gitignore
This works for me :) |
This worked for me on m1 pro Ventura, thanks |
Worked For me |
To solve the
pod install
issue on the M1 MacBook, #2974 suggestsarch -x86_64 pod install
command. You can also find it in a CocoaPods issue.However, this approach is inappropriate. You may receive the following warnings when you run
arch -x86_64 pod install
:facebook/react-native#33017
This is a Ruby problem built in macOS. The built-in Ruby has been deprecated since Catalina (10.15), so you'll have to find another way.
Solution
brew install cocoapods
internally downloads a Ruby suitable for the M1 MacBook.The whole method I'd like to suggest is:
brew install cocoapods
pod install
instead of:
sudo gem install cocoapods
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
See also
The text was updated successfully, but these errors were encountered: