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
flutterfolder in your preferred directory, like~/development.
Add Flutter to PATH:
- Open a terminal and add Flutter to your PATH by editing your
.zshrcor.bash_profilefile: - Replace
<PATH_TO_FLUTTER_DIRECTORY>with the actual path to your Flutter directory. - Save and run
source ~/.zshrcorsource ~/.bash_profileto 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:
Accept Apple Developer License:
- Open a terminal and run:
- 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:
Run Flutter Doctor:
- In the terminal, type:
- This command checks for any missing dependencies. Follow any additional steps it suggests.
Comments
Post a Comment