1. Install Homebrew:
  • Open Terminal and run the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh

2. Install Node.js:

  • In Terminal, run the following command:
brew install node

3. Install Watchman:

  • In Terminal, run the following command:
brew install watchman

4. Install Xcode:

  • Go to the Mac App Store and install Xcode, the official development environment for iOS.

5. Install CocoaPods:

  • In Terminal, run the following command:
sudo gem install cocoapods

6. Install JDK (Java Development Kit):

7. Install Android Studio:

8. Set up Android SDK:

  • Launch Android Studio and follow the on-screen instructions to install the necessary SDK components.

9. Configure Environment Variables:

  • Open Terminal and run the following command:
open ~/.bash_profile
  • Add the following lines to the file that opens:
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

Save the file and close it.

10. Install React Native CLI:

  • In Terminal, run the following command:
npm install -g react-native-cli

11. Create a New React Native Project:

  • Navigate to the desired directory in the Terminal and run the following command:
npx react-native init YourProjectName

Replace "YourProjectName" with the desired name for your project.

Congratulations! You have successfully set up React Native on macOS for iOS and Android development. You can now run your React Native app on iOS simulators/emulators and Android devices/emulators by following the respective platform-specific instructions provided by React Native.

Happy coding!

Comments