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
This commit is contained in:
Riccardo Cipolleschi
2022-02-21 08:39:39 -08:00
committed by Facebook GitHub Bot
parent 200488e87c
commit 4ec2d6cf0b
+10 -4
View File
@@ -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