Installing Flutter on macOS

 

  • Download Flutter:

    • Visit the Flutter SDK download page and download the latest Flutter SDK for macOS.
    • Unzip the file and place the flutter folder in your preferred directory, like ~/development.
  • Add Flutter to PATH:

    • Open a terminal and add Flutter to your PATH by editing your .zshrc or .bash_profile file:

      export PATH="$PATH:`<PATH_TO_FLUTTER_DIRECTORY>/flutter/bin`"
    • Replace <PATH_TO_FLUTTER_DIRECTORY> with the actual path to your Flutter directory.
    • Save and run source ~/.zshrc or source ~/.bash_profile to update the PATH.
  • Install Xcode:

    • Download Xcode from the App Store.
    • Open Xcode and agree to its terms to finish the installation.
    • Install Xcode command-line tools by running:
      xcode-select --install
  • Accept Apple Developer License:

    • Open a terminal and run:
      sudo xcodebuild -license
    • Follow the prompts to accept the license.
  • Enable iOS Development:

    • Open Xcode, go to Preferences > Locations, and ensure that the command line tools are set to the latest version of Xcode.
  • Install CocoaPods:

    • CocoaPods is a dependency manager for iOS projects. Install it by running:
      sudo gem install cocoapods
  • Run Flutter Doctor:

    • In the terminal, type:
      flutter doctor
    • This command checks for any missing dependencies. Follow any additional steps it suggests.
  • Comments

    Popular posts from this blog

    Installing Flutter on Windows