Reputation: 45
How to setup up the development environment for React Native in Apple M1 ARM-based system?
Upvotes: 0
Views: 3180
Reputation: 45
RN Environment Set For Android & iOS :
Install home-brew (https://brew.sh)
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Don’t use the wrong JDK for React Native if you’re using an M1 Mac …or you’ll be going 2x as slow and not know why
*Reference (https://shift.infinite.red/dont-use-the-wrong-jdk-for-react-native-if-you-re-using-an-m1-mac-252533dd47a2)
Install SDKMAN (https://sdkman.io)
curl -s "https://get.sdkman.io" | bash sdk list java (check the version you want to install) sdk install java 11.0.14-zulu
*Using of Sdkman (https://towardsdatascience.com/install-and-run-multiple-java-versions-on-linux-using-sdkman-858571bce6cf)
Download and Install Android Studio
Add the following lines to your in your ~/.zshrc :
Note : To add this :
Create project :
npx react-native init AwesomeProject
Run project : npx react-native run-android - (to run in android)
Reaming Setup for iOS :
Install Xcode from Appstore
ruby -v (ruby is default installed)
Open terminal and type :
brew install libffi
brew install cocoapods
Now to run iOS application
Upvotes: 1