macOS install

System requirements

To install and run Flutter, your development environment must meet these minimum requirements:

  • Operating Systems: macOS, version 10.14 (Mojave) or later.
  • Disk Space: 2.8 GB (does not include disk space for IDE/tools).
  • Tools: Flutter uses git for installation and upgrade. We recommend installing Xcode, which includes git, but you can also install git separately.

Get the Flutter SDK

  1. Download the following installation bundle to get the latest stable release of the Flutter SDK:

    Intel   Apple Silicon
    (loading…)   (loading…)

    For other release channels, and older builds, check out the SDK archive.

  2. Extract the file in the desired location. For example:

    $ cd ~/development
    $ unzip ~/Downloads/
  3. Add the flutter tool to your path:

    $ export PATH="$PATH:`pwd`/flutter/bin"

    This command sets your PATH variable for the current terminal window only. To permanently add Flutter to your path, check out Update your path.

You are now ready to run Flutter commands!

Run flutter doctor

Run the following command to see if there are any dependencies you need to install to complete the setup (for verbose output, add the -v flag):

$ flutter doctor

This command checks your environment and displays a report to the terminal window. The Dart SDK is bundled with Flutter; it isn’t necessary to install Dart separately. Check the output carefully for other software you might need to install or further tasks to perform (shown in bold text).

For example:

[-] Android toolchain - develop for Android devices
    • Android SDK at /Users/dash/Library/Android/sdk
    ✗ Android SDK is missing command line tools; download from
    • Try re-installing or updating your Android SDK,
      visit for detailed instructions.

The following sections describe how to perform these tasks and finish the setup process.

Once you have installed any missing dependencies, run the flutter doctor command again to verify that you’ve set everything up correctly.

Downloading straight from GitHub instead of using an archive

This is only suggested for advanced use cases.

You can also use git directly instead of downloading the prepared archive. For example, to download the stable branch:

$ git clone -b stable

Update your path, and run flutter doctor. This lets you know if there are other dependencies you need to install to use Flutter (such as the Android SDK).

If you didn’t use the archive, Flutter downloads necessary development binaries as they are needed (if you used the archive, they are included in the download). You might want to pre-download these development binaries (for example, you might do this when setting up hermetic build environments, or if you only have intermittent network availability). To do so, run the following command:

$ flutter precache

For additional download options, check out flutter help precache.

Update your path

You can update your PATH variable for the current session at the command line, as shown in step 3 of Get the Flutter SDK. To update this variable permanently so you can run flutter commands in any terminal session, use the following instructions.

The steps for modifying the PATH variable all subsequent terminal sessions are machine-specific. Typically, you add a line to a shell script file that executes whenever you open a new window. For example:

  1. Determine the path of your clone of the Flutter SDK. You need this in Step 3.
  2. Open (or create) the rc file for your shell. Typing echo $SHELL in your Terminal tells you which shell you’re using. If you’re using Bash, edit $HOME/.bash_profile or $HOME/.bashrc. If you’re using Z shell, edit $HOME/.zshrc. If you’re using a different shell, the file path and filename will be different on your machine.
  3. Add the following line and change [PATH_OF_FLUTTER_GIT_DIRECTORY] to be the path of your clone of the Flutter git repo:

  4. Run source $HOME/.<rc file> to refresh the current window, or open a new terminal window to automatically source the file.
  5. Verify that the flutter/bin directory is now in your PATH by running:

    $ echo $PATH

    Verify that the flutter command is available by running:

    $ which flutter

Platform setup

macOS supports developing Flutter apps for iOS, Android, macOS itself and the web. Complete at least one of the platform setup steps now, to be able to build and run your first Flutter app.

iOS setup

Install Xcode

To develop Flutter apps for iOS, you need a Mac with Xcode installed.

  1. Install the latest stable version of Xcode (using web download or the Mac App Store).

  2. To configure the Xcode command-line tools to use the installed version, run the following commands.

    $ sudo xcode-select -s /Applications/
    $ sudo xcodebuild -runFirstLaunch

    To use the latest version of Xcode, use this path. If you need to use a different version, specify that path instead.

  3. Sign the Xcode license agreement. To sign the SLA, either:

    1. Open Xcode and confirm.

    2. Open the Terminal and run:

      $ sudo xcodebuild -license

Versions older than the latest stable version might still work, but are not recommended for Flutter development.

With Xcode, you can run Flutter apps on an iOS device or on the simulator.

Set up the iOS simulator

To prepare to run and test your Flutter app on the iOS simulator, follow this procedure.

  1. If using Xcode 15 or greater, download and install the iOS Simulator by running the following command:

    $ xcodebuild -downloadPlatform iOS

    If you want to use a different method of downloading and installing the iOS Simulator, check out Apple’s documentation on installing Simulators for more options.

  2. To start the Simulator, run the following command:

    $ open -a Simulator
  3. Set your Simulator to use a 64-bit device (iPhone 5s or later).

    • From Xcode, choose a simulator device type. Go to Product > Destination > Choose your target device.

    • From the Simulator app, go to File > Open Simulator > Choose your target iOS device

    • To check the device version in the Simulator, open the Settings app > General > About.

  4. The simulated high-screen density iOS devices might overflow your screen. If that appears true on your Mac, change the presented size in the Simulator app

    • To display the Simulator at a small size, go to Window > Physical Size or
      press Cmd + 1.

    • To display the Simulator at a moderate size, go to Window > Point Accurate or
      press Cmd + 2.

    • To display the Simulator at an HD representation, go to Window > Pixel Accurate or
      press Cmd + 3. The Simulator defaults to this size.

    • The Simulator defaults to Fit Screen. If you need to return to that size, go to Window > Fit Screen or press Cmd + 4.

Deploy to physical iOS devices

To deploy your Flutter app to a physical iPhone or iPad, you need to do the following:

  • Create an Apple Developer account.
  • Set up physical device deployment in Xcode.
  • Create a development provisioning profile to self-sign certificates.
  • Install the third-party CocoaPods dependency manager if your app uses Flutter plugins.

Create your Apple ID and Apple Developer account

To test deploying to a physical iOS device, you need an Apple ID.

To distribute your app to the App Store, you must enroll in the Apple Developer Program.

If you only need to test deploying your app, complete the first step and move on to the next section.

  1. If you don’t have an Apple ID, create one.

  2. If you haven’t enrolled in the Apple Developer program, enroll now.

    To learn more about membership types, check out Choosing a Membership.

Attach your physical iOS device to your Mac

Configure your physical iOS device to connect to Xcode.

  1. Attach your iOS device to the USB port on your Mac.

  2. On first connecting your iOS device to your Mac, your iOS device displays the Trust this computer? dialog.

  3. Click Trust.

    Trust Mac

  4. When prompted, unlock your iOS device.

Enable Developer Mode on iOS 16 or later

Starting with iOS 16, Apple requires you to enable Developer Mode to protect against malicious software. Enable Developer Mode before deploying to a device running iOS 16 or later.

  1. Tap on Settings > Privacy & Security > Developer Mode.

  2. Tap to toggle Developer Mode to On.

  3. Tap Restart.

  4. After the iOS device restarts, unlock your iOS device.

  5. When the Turn on Developer Mode? dialog appears, tap Turn On.

    The dialog explains that Developer Mode requires reducing the security of the iOS device.

  6. Unlock your iOS device.

Enable developer code signing certificates

To deploy to a physical iOS device, you need to establish trust with your Mac and the iOS device. This requires you to load signed developer certificates to your iOS device. To sign an app in Xcode, you need to create a development provisioning profile.

Follow the Xcode signing flow to provision your project.

  1. Open Xcode.

  2. Sign in to Xcode with your Apple ID.

    1. Go to Xcode > *Settings…
    2. Click Accounts.
    3. Click +.
    4. Select Apple ID and click Continue.
    5. When prompted, enter your Apple ID and Password.
    6. Close the Settings dialog.

    Development and testing supports any Apple ID.

  3. Go to File > Open…

    You can also press Cmd + O.

  4. Navigate to your Flutter project directory.

  5. Open the default Xcode workspace in your project: ios/Runner.xcworkspace.

  6. Select the physical iOS device you intend to deploy to in the device drop-down menu to the right of the run button.

    It should appear under the iOS devices heading.

  7. In the left navigation panel under Targets, select Runner.

  8. In the Runner settings pane, click Signing & Capabilities.

  9. Select All at the top.

  10. Select Automatically manage signing.

  11. Select a team from the Team dropdown menu.

    Teams are created in the App Store Connect section of your Apple Developer Account page. If you have not created a team, you can choose a personal team.

    The Team dropdown displays that option as Your Name (Personal Team).

    Xcode account add

    After you select a team, Xcode performs the following tasks:

    1. Creates and downloads a Development Certificate
    2. Registers your device with your account,
    3. Creates and downloads a provisioning profile if needed

If automatic signing fails in Xcode, verify that the project’s General > Identity > Bundle Identifier value is unique.

Check the app's Bundle ID

Enable trust of your Mac and iOS device

When you attach your physical iOS device for the first time, enable trust for both your Mac and the Development Certificate on the iOS device.

Agree to trust your Mac

You should enabled trust of your Mac on your iOS device when you attached the device to your Mac.

Enable developer certificate for your iOS devices

Enabling certificates varies in different versions of iOS.

  1. Open the Settings app on the iOS device.

  2. Tap on General > Profiles & Device Management.

  3. Tap to toggle your Certificate to Enable

  1. Open the Settings app on the iOS device.

  2. Tap on General > VPN & Device Management.

  3. Tap to toggle your Certificate to Enable.

  1. Open the Settings app on the iOS device.

  2. Tap on General > VPN & Device Management.

  3. Under the Developer App heading, you should find your certificate.

  4. Tap your Certificate.

  5. Tap Trust “<certificate>“.

  6. When the dialog displays, tap Trust.

If prompted, enter your Mac password into the codesign wants to access key… dialog and tap Always Allow.

Optional deployment procedures

You can skip these procedures. They enable additional debugging features.

Set up wireless debugging on your iOS device

Follow this procedure to debug your device using a Wi-Fi connection.

To use wireless debugging:

  • Connect your iOS device to the same network as your macOS device.
  • Set a passcode for your iOS device.

After you connect your iOS device to your Mac:

  1. Open Xcode.

  2. Go to Window > Devices and Simulators.

    You can also press Shift + Cmd + 2.

  3. Select your iOS device.

  4. Select Connect via Network.

  5. Once the network icon appears next to the device name, unplug your iOS device from your Mac.

If you don’t see your device listed when using flutter run, extend the timeout. The timeout defaults to 10 seconds. To extend the timeout, change the value to an integer greater than 10.

flutter run --device-timeout 60
Learn more about wireless debugging
Install CocoaPods

Follow this procedure if your apps depend on Flutter plugins with native iOS code.

To Install and set up CocoaPods, run the following commands:

$ sudo gem install cocoapods

Android setup

Install Android Studio

help Help

  1. Download and install Android Studio.
  2. Start Android Studio, and go through the ‘Android Studio Setup Wizard’. This installs the latest Android SDK, Android SDK Command-line Tools, and Android SDK Build-Tools, which are required by Flutter when developing for Android.
  3. Run flutter doctor to confirm that Flutter has located your installation of Android Studio. If Flutter cannot locate it, run flutter config --android-studio-dir=<directory> to set the directory that Android Studio is installed to.

Set up your Android device

help Help

To prepare to run and test your Flutter app on an Android device, you need an Android device running Android 5.0 (API level 21) or higher.

  1. Enable Developer options and USB debugging on your device. Detailed instructions are available in the Android documentation.
  2. [Optional] To leverage wireless debugging, enable Wireless debugging on your device. Detailed instructions are available in the Android documentation.
  3. Windows-only: Install the Google USB Driver.
  4. Using a USB cable, plug your phone into your computer. If prompted on your device, authorize your computer to access your device.
  5. In the terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device. By default, Flutter uses the version of the Android SDK where your adb tool is based. If you want Flutter to use a different installation of the Android SDK, you must set the ANDROID_SDK_ROOT environment variable to that installation directory.

Set up the Android emulator

help Help

To prepare to run and test your Flutter app on the Android emulator, follow these steps:

  1. Enable VM acceleration on your machine.
  2. Launch Android Studio, click the Device Manager icon, and select Create Device under Virtual tab…
    • In older versions of Android Studio, you should instead launch Android Studio > Tools > Android > AVD Manager and select Create Virtual Device…. (The Android submenu is only present when inside an Android project.)
    • If you do not have a project open, you can choose 3-Dot Menu / More Actions > Virtual Device Manager and select Create Device…
  3. Choose a device definition and select Next.
  4. Select one or more system images for the Android versions you want to emulate, and select Next. An x86 or x86_64 image is recommended.
  5. Under Emulated Performance, select Hardware - GLES 2.0 to enable hardware acceleration.
  6. Verify the AVD configuration is correct, and select Finish.

    For details on the above steps, see Managing AVDs.

  7. In Android Virtual Device Manager, click Run in the toolbar. The emulator starts up and displays the default canvas for your selected OS version and device.

Agree to Android Licenses

help Help

Before you can use Flutter, you must agree to the licenses of the Android SDK platform. This step should be done after you have installed the tools listed above.

  1. Open an elevated console window and run the following command to begin signing licenses.
    $ flutter doctor --android-licenses
  2. Review the terms of each license carefully before agreeing to them.
  3. Once you are done agreeing with licenses, run flutter doctor again to confirm that you are ready to use Flutter.

macOS setup

Additional macOS requirements

For macOS desktop development, you need the following in addition to the Flutter SDK:

Next step

Set up your preferred editor.