$ sudo xcode-select –switch /Applications/Xcode.app/Contents/Developer Install the latest stable version of Xcode (using web download or the Mac App Store).Ĭonfigure the Xcode command-line tools to use the newly-installed version of Xcode by running the following from the command line: To develop Flutter apps for iOS, you need a Mac with Xcode installed. Complete at least one of the platform setup steps now, to be able to build and run your first Flutter app. MacOS supports developing Flutter apps in iOS, Android, and the web (technical preview release). Verify that the flutter command is available by running: Verify that the flutter/bin directory is now in your PATH by running: to refresh the current window, or open a new terminal window to automatically source the file. (3) a different shell, the file path and filename will be different on your machine.Īdd the following line and change to be the path of your clone of the Flutter git repo: (1)Bash, edit $HOME/.bash_profile or $HOME/.bashrc. Typing echo $SHELL in your Terminal tells you which shell you’re using. Open (or create) the rc file for your shell. For example:ĭetermine the path of your clone of the Flutter SDK. Typically you add a line to a file that is executed whenever you open a new window. The steps for modifying this variable permanently for all terminal sessions are machine-specific. You’ll probably want to update this variable permanently, so you can run flutter commands in any terminal session. You can update your PATH variable for the current session at the command line, as shown in Get the Flutter SDK. You may wish to pre-download these development binaries. If you did not use the archive, Flutter will download necessary development binaries as they are needed. That will let you know if there are other dependencies you need to install to use Flutter Update your path, and run flutter doctor. $ flutter doctor Downloading straight from GitHub instead of using an archive 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): This command sets your PATH variable for the $ unzip ~/Downloads/flutter_macos_2.2.2-stable.zip Extract the file in the desired location:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |