Set NVM to 18:
nvm install 18
nvm use 18
Install Watchman with Brew
brew install watchman
Ruby Setup
*Install rbenv for Ruby version management *
brew install rbenv
*Set up rbenv in your shell *
rbenv init
*Install Ruby 2.7.6 (recommended for React Native) *
rbenv install 2.7.6 rbenv global 2.7.6
*Verify Ruby version *
ruby -v
Install Xcode
From Apple Store
[✓] macOS 16.1 (built-in)
[✓] iOS 18.1
Manually Install Xcode iOS Simulator:
- Open Xcode
- Xcode → Preferences → Components
- Download a simulator (iOS 16+ recommended)
Install Xcode command line should now be installed? If not:
xcode-select --install
You can run several commands to verify your Xcode setup:
First, check that Xcode command line tools are installed:
xcode-select --version
Verify Xcode's location:
xcode-select -p
Should typically show /Applications/Xcode.app/Contents/Developer
Check the full Xcode version:
xcodebuild -version
Verify iOS simulator is installed:
xcrun simctl list devices
This should show you a list of available iOS simulators.
If any of these commands fail, you might need to:
Accept Xcode license:
sudo xcodebuild -license accept
Or reinstall command line tools:
xcode-select --install
Install CocoaPods
sudo gem install cocoapods
If CocoaPods doesn't install because there's a Ruby version conflict. Maybe you're running Ruby 2.6.10, but you need at least Ruby 2.7.0.
Here's how to fix this:
Install a newer version of Ruby using Homebrew:
brew install ruby
Add the new Ruby to your PATH in your .zshrc file:
echo 'export PATH="/opt/homebrew/opt/ruby/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Verify you have the new Ruby version:
ruby -v
(Should show a version >= 2.7.0)
Try installing Cocoapods again:
bashCopysudo gem install cocoapods
After installation, verify Cocoapods is installed:
pod --version
A lot can go wrong at this juncture, I suggest if you have any issues, using Claude or ChatGPT to troubleshoot and don't move on until you can see all versions installed from your terminal and all paths are correct in your
.zshrc
etc...
Install Android Studio:
brew install --cask android-studio
Android Studio Setup:
- Open Android Studio
- Complete initial setup wizard (Choose Custom)
- Install Android SDK (via Tools → SDK Manager):
- Android SDK Platform 14 (API 34)
- Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image
- Android SDK Build-Tools
- NDK (Side by side)
- CMake
Configure Environment Variables:
Add to your ~/.zshrc or ~/.bash_profile:
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
Create Android Virtual Device (AVD):
- Open Android Studio
- Tools → AVD Manager
- Create Virtual Device
- Select a device definition (e.g., Pixel 4)
- Select a system image (API 35 recommended)
Verification Steps
Install React Native CLI?
The react-native-cli global package is actually deprecated. Instead, you should use @react-native-community/cli which comes bundled with the npx command.
If already installed, you can safely uninstall the global CLI:
npm uninstall -g react-native-cli
And instead, when creating new projects, use:
npx react-native init ProjectName
This approach is preferred because:
- It ensures you always use the latest version of the CLI
- Avoids global package installations
- Prevents version conflicts
Create a test project:
npx react-native init TestProject --template react-native-template-typescript
cd TestProject
Test iOS setup:
cd ios && pod install && cd ..
npx react-native run-ios
Test Android setup:
# Start Android emulator first
npx react-native run-android
Troubleshooting
If you encounter M1-specific issues:
For iOS: Try adding this to your Podfile:
rubyCopypost_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
end
end
end
For Android: Ensure you're using the ARM64 system image when creating AVD
Top comments (0)