From 4ec2d6cf0ba367f2ef5ae2e2250ac12fe1202ffe Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Mon, 21 Feb 2022 08:39:39 -0800 Subject: [PATCH] Update RNTester documentation for Mac M1 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 --- packages/rn-tester/README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/rn-tester/README.md b/packages/rn-tester/README.md index 787457e8143de5..9b82278a78d5b1 100644 --- a/packages/rn-tester/README.md +++ b/packages/rn-tester/README.md @@ -30,10 +30,16 @@ rm Podfile.lock If you are still having a problem after doing the clean up (which can happen if you have built RNTester with older React Native versions where files were generated inside the react-native folder.), the best way might be to clean-install react-native (e.g. remove node_modules and yarn install). Both macOS and Xcode are required. -- `cd packages/rn-tester` -- Install [Bundler](https://bundler.io/): `gem install bundler`. We use bundler to install the right version of [CocoaPods](https://cocoapods.org/) locally. -- Install Bundler and CocoaPods dependencies: `bundle install && bundle exec pod install`. In order to use Hermes engine instead of JSC, run: `USE_HERMES=1 bundle exec pod install` instead. -- Open the generated `RNTesterPods.xcworkspace`. This is not checked in, as it is generated by CocoaPods. Do not open `RNTesterPods.xcodeproj` directly. +1. `cd packages/rn-tester` +1. Install [Bundler](https://bundler.io/): `gem install bundler`. We use bundler to install the right version of [CocoaPods](https://cocoapods.org/) locally. +1. Install Bundler and CocoaPods dependencies: `bundle install && bundle exec pod install`. In order to use Hermes engine instead of JSC, run: `USE_HERMES=1 bundle exec pod install` instead. +1. Open the generated `RNTesterPods.xcworkspace`. This is not checked in, as it is generated by CocoaPods. Do not open `RNTesterPods.xcodeproj` directly. + +#### Note for M1 users +If you own a Mac M1 laptop, you need to run some different commands to install and run cocoapods. + +- `sudo arch -x86_64 gem install ffi`: this installs the `ffi` package to load dynamically-linked libraries. +- `arch -x86_64 pod install`: this run `pod install` with the right architecture. ### Running on Android