Skip to content

Commit 63e0f4a

Browse files
committed
updated build instructions for Apple silicon based machines
1 parent 7211119 commit 63e0f4a

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

packages/rn-tester/README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,44 @@ Both macOS and Xcode are required.
3535
4. Open the generated `RNTesterPods.xcworkspace`. This is not checked in, as it is generated by CocoaPods. Do not open `RNTesterPods.xcodeproj` directly.
3636

3737
#### Note for Apple Silicon users
38+
If you own a Mac laptop with Apple Silicon, follow these additional steps for proper setup:
3839

39-
If you own a Mac laptop with Apple Silicon, you need to run some different commands to install and run cocoapods.
40+
1. Install Rosetta 2 if you haven't already:
41+
```sh
42+
softwareupdate --install-rosetta
43+
```
44+
45+
2. Install Bundler using Rosetta:
46+
```sh
47+
arch -x86_64 sudo gem install bundler
48+
```
4049

41-
- `sudo arch -x86_64 gem install ffi`: this installs the `ffi` package to load dynamically-linked libraries.
42-
- `arch -x86_64 pod install`: this run `pod install` with the right architecture.
50+
3. Install the required packages:
51+
```sh
52+
# Install ffi package to load dynamically-linked libraries
53+
sudo arch -x86_64 gem install ffi
54+
55+
# Install CocoaPods dependencies using the correct architecture
56+
arch -x86_64 bundle install
57+
58+
# Install pods with the correct architecture
59+
arch -x86_64 pod install
60+
```
61+
62+
If you encounter build issues, you may need to clean and rebuild:
63+
```sh
64+
# Clean existing builds
65+
yarn clean-ios
66+
67+
# Remove and reinstall pods
68+
arch -x86_64 bundle exec pod deintegrate
69+
arch -x86_64 bundle exec pod install
70+
```
71+
72+
Then proceed with opening the workspace in Xcode:
73+
```sh
74+
open RNTesterPods.xcworkspace
75+
```
4376

4477
### Running on Android
4578

0 commit comments

Comments
 (0)