Setup new Apple M1 from scratch for react-native cli

- Install Home Brew. Open a terminal and execute next command:
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Take to attention!!!
Make sure that quotes in the commands are not wrong.
2. Execute one of next commands:
touch ~/.zshrc
or
touch ~/.bashrc
3. To install RVM we need to install “gpg” module.
brew install gpg
4. Installing RVM — Ruby version manager.
gpg — recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable
\curl -sSL https://get.rvm.io | bash -s stable — rails
4.1. Make sure that RVM did update in ~/.zshrc or ~/.bash_profile
5. Reboot terminal
6. rvm install 2.7.4
rvm — default use 2.7.4
8. To make sure that ruby version is 2.7.4 in your terminal execute next command:
ruby -v
9. We don’t need to use “sudo” to install gem, since we did install RVM without sudo. Execute next:
gem install cocoapods
10. Installing NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
11. Reboot terminal
12. nvm ls-remote
13. nvm install v16.14.0
14. nvm alias default v16.14.0
15. node -v
16. npm i -g yarn
17. brew install watchman
18. brew install — cask adoptopenjdk/openjdk/adoptopenjdk11
19. Install Android Studio and XCode
20. While on Android Studio installation wizard, make sure the boxes next to all of the following items are checked:
Android SDK
Android SDK Platform
Android Virtual Device
21. Open Android studio preferences
try to search word “sdk”
Install SDK Android 10.0 (Q)
Click by SDK Tool tab
Install NDK
Install Android SDK Command-line Tools (latest)
22. Add the following lines to your $HOME/.bash_profile or $HOME/.bashrc (if you are using zsh then ~/.zprofile or ~/.zshrc) config file:
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
Update XCode
sudo xcode-select — switch /Applications/Xcode.app
sudo xcodebuild -license accept
24. Now you can try to install react-native skeleton and play with it
Subscribe on my Telegram Channel:
