Skip to content

Instantly share code, notes, and snippets.

@backviet
Last active February 16, 2019 15:35
Show Gist options
  • Save backviet/6414433605b3e26810feb8f7c481cb14 to your computer and use it in GitHub Desktop.
Save backviet/6414433605b3e26810feb8f7c481cb14 to your computer and use it in GitHub Desktop.
A simple way to setup flutter environment in macOS
#!/usr/bin/env bash
# Save this file in the samle parent forder of flutter sdk
# run commandline:
# $cd /path/to/parent/of/flutter
# $sh flutter_setup.sh
BASE_DIR=$(pwd)
echo "BASE_DIR: $BASE_DIR"
echo "export PATH=\$PATH:$BASE_DIR/flutter/bin" >> ~/.bash_profile
source ~/.bash_profile
echo $PATH
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license
brew update
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller ios-deploy cocoapods
pod setup
flutter doctor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment