Prerequisites for Starting a React Native Project on macOS

  1. Install Homebrew:

    /bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>)"
    
    
  2. Install Node.js and npm:

    brew install node
    
    
  3. Install Watchman:

    brew install watchman
    
    
  4. Install CocoaPods:

    sudo gem install cocoapods
    
    
  5. Install Xcode:

  6. Set Xcode Command Line Tools:

    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
    
    
  7. Install Android Studio:

  8. Set Up Android Environment Variables:

Steps to Create the Basic React Native App with macOS and Android Support

  1. Initialize a New React Native Project:

    npx react-native init <project_name>
    
    
  2. Add macOS Support:

    npx react-native init <project_name> --template react-native-template-macos
    
    

If You Run Into This...

  1. Error: cli.init is not a function

  2. Error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory is a command line tools instance

  3. Error: CocoaPods could not find compatible versions for pod "React-RuntimeHermes"

  4. Error: adb: command not found

  5. Error: Failed to launch emulator. Reason: No emulators found

  6. Error: SDK location not found

Python Script: react_native_project_provisioning.py