React Native Development

Complete Guide: Setting Up React Native on macOS for iOS and Android Development

Step-by-Step Tutorial to Install React Native, Xcode, Android Studio, and Configure Environment for Cross-Platform App Development on macOS

CDDeveloper
2 min readJun 26, 2023
MacBook
  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! and Please Follow and Subscribe to me.

If you liked this course syllabus and want to lectures, here are entire courses you may enjoy:

You can connect with me on LinkedIn, or by visiting my website, cdappdeveloper.

--

--