This script automates the provisioning of a full-stack mobile development environment on macOS. From a single entry point, you can prepare React Native, Flutter (via FVM), iOS native, and Android native tooling. Key components installed or managed:
- Homebrew
- RVM (Ruby Version Manager) and Ruby 3.1.x
- NVM (Node Version Manager) and Node 18 LTS
- Bundler and CocoaPods
- Yarn
- Flutter Version Manager (FVM)
- Watchman
- Zulu JDK 11, Android Studio + Platform Tools
- Xcode Command Line Tools
Make sure you have the following:
- macOS with administrator rights (Ventura or newer recommended)
- Stable internet connection (script checks connectivity upfront)
- Xcode downloaded from the App Store if you plan to target iOS
- At least 30 GB free disk space for SDKs and emulators
- Terminal access
-
Make the script executable:
chmod +x setup_env_mobile.sh
-
Run the script:
./setup_env_mobile.sh
# or run in non-interactive mode
./setup_env_mobile.sh --force-
Pick the stack you need: the script prompts with five options (React Native, Flutter, iOS, Android, or All). Type the number and press Enter.
-
Let the automation finish: every install step and PATH export runs hands-free. When complete, you get a summary table of provisioned tools.
After the script completes, run a quick validation:
ruby -v # Verify Ruby via RVM
node -v # Verify Node via NVM
yarn -v # Confirm Yarn
pod --version # Confirm CocoaPods
fvm --version # Check Flutter Version Manager
fvm flutter doctor # Inspect the Flutter toolchain through FVM
adb version # Confirm Android Platform Tools (if installed)If PATH looks incorrect, reload your shell:
source ~/.zshrcFor Flutter projects, pin a version with FVM before you start coding:
cd <project_name>
fvm use 3.19.0 --install
fvm flutter pub getThe script appends the alias flutter='fvm flutter', so every new terminal session routes flutter commands through FVM automatically.
- If Homebrew is not found, try running:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - If RVM is not detected, restart your terminal and try:
source /opt/homebrew/share/rvm/scripts/rvm - If NVM does not load properly, run:
source ~/.zshrc
- FVM reports a missing Flutter SDK: change into your project folder and run
fvm use <version> --install. - Android Studio missing SDK packages: launch Android Studio once, open SDK Manager, and install SDK Platform 34 plus the latest tools.
pod installpermission errors: executesudo gem install cocoapodsand retry from your iOS project.
To remove installed tools, use the following:
brew uninstall rvm nvm
rvm implode
nvm uninstall <node_version>
gem uninstall cocoapods bundlerflowchart TD
A[Setup request ticket] --> B{Select target stack}
B -->|React Native| C[Option 1: React Native]
B -->|Flutter| D[Option 2: Flutter]
B -->|iOS Native| E[Option 3: iOS Native]
B -->|Android Native| F[Option 4: Android Native]
B -->|Full Suite| G[Option 5: All]
C --> H[RVM + NVM + Yarn + Pods]
D --> I[FVM install & fvm flutter doctor]
E --> J[Xcode CLT + Pods]
F --> K[Zulu JDK + Android Studio]
G --> H
G --> I
G --> J
G --> K
H --> L[Aggregate logs & sanity checks]
I --> L
J --> L
K --> L
L --> M[Share README + support contact]
🚀 Malco Helper!