Flutter

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
brew install --HEAD libimobiledevice
brew install ideviceinstaller
brew install ios-deploy
brew install cocoapods
pod setup
git clone -b beta https://github.com/flutter/flutter.git
export PATH=`pwd`/flutter/bin:$PATH
# 中国可设置使用
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
# 检测本地环境
flutter doctor
# 升级
flutter upgrade
# 构建 APK
flutter build apk
# 构建 iOS
flutter build ios
# 安装到链接的设备上
flutter install
# 创建项目
flutter create --org com.myapp -i swift -a kotlin --description 'My App' myapp
flutter packages get
flutter packages upgrade
# 分支切换
# =======
# 查看所有 channel
flutter channel
# 如果没有, 可先拉取
git fetch origin dev:dev
# 切换分支 - 一般推荐使用 beta 分支
flutter channel dev

dart2#