Flutter on macOS for iOS and Android: A Clean Setup That Does Not Collapse Later
A step-by-step Flutter setup guide for macOS that covers Flutter SDK installation, `flutter doctor`, iOS and Android prerequisites, CocoaPods, emulators, and the exact commands to get a real project running.
The real Flutter setup problem: the framework itself is not usually the hard part. The pain comes from the native toolchains under it. If iOS, Android, CocoaPods, Xcode, or SDK paths are even slightly wrong, Flutter becomes the messenger that gets blamed.
Step 1: install Flutter SDK
On macOS, one of the simplest official-friendly ways is Homebrew:
brew install --cask flutterOr download the SDK manually from Flutter and add it to PATH. After installation, verify:
flutter --versionStep 2: run flutter doctor immediately
Do this before creating a project:
flutter doctorThis is the command that tells you whether Flutter itself, Xcode, Android toolchains, and connected devices are actually ready.
If you skip this and jump straight to flutter run, you usually get slower, noisier errors later.
Step 3: fix iOS prerequisites
For iOS on macOS, you typically need:
- Xcode installed
- Xcode command line tools
- accepted Xcode license
- CocoaPods available
Useful checks:
xcode-select -p
sudo xcodebuild -license accept
pod --versionIf pod is missing, fix CocoaPods before blaming Flutter. A lot of iOS plugin failures are just native dependency manager failures in disguise.
Step 4: fix Android prerequisites
For Android, you need:
- Android SDK command-line tools or Android Studio-managed SDK
- accepted licenses
- emulator or device access
Useful checks:
sdkmanager --list
yes | sdkmanager --licenses
adb devicesflutter doctor will usually tell you what part of the Android stack is still incomplete.
Step 5: create and run a project
Create an app:
flutter create demo_app
cd demo_appFetch packages:
flutter pub getSee available devices:
flutter devicesRun the app:
flutter runThe iOS plugin trap
If your app uses plugins and the iOS build fails, try the standard cleanup sequence:
flutter clean
flutter pub get
cd ios
pod install
cd ..
flutter runThis is not magical. It simply rebuilds Flutter’s generated state and re-resolves the iOS native dependencies.
The Android side trap
If Flutter cannot find an Android device, separate the problem:
flutter devices
adb devicesIf adb devices is empty, that is not a Flutter problem yet. Fix the Android runtime layer first.
A good setup checklist for teams
If you want a Mac Flutter setup that stays healthy, verify all of these:
flutter doctor
flutter --version
pod --version
adb devices
flutter devicesYou want green checks not because green is pretty, but because Flutter is one of those ecosystems where tiny native misconfigurations become hour-long detours later.
The deeper lesson
Flutter is often sold as “one codebase, many platforms,” which is directionally true. But the developer machine still has to satisfy several native ecosystems. Teams that respect that reality end up liking Flutter more because they stop expecting the framework to paper over broken environment setup.
Final recommendation
Treat your first successful flutter run on both iOS and Android as part of setup, not as the beginning of work. If you verify both sides early, later plugin changes and CI issues become much easier to debug because your local baseline is trustworthy.