Xcode打开项目勾选自动签名,设置Team和Bundle Identifier
等待Xcode自动下载安装Certificates和Provisioning Profile
确认mac里已经安装开发者证书Certificates和Provisioning Profile
将下面代码保存为shell文件,修改配置参数后,放到项目根目录执行
# 配置上传参数
user="配置Apple ID"
pass="配置App-Specific Passwords"
# 拉取代码
project_path=$(cd `dirname $0`; pwd)
cd $project_path
git pull
# 检查环境
flutter doctor
# 清理项目
flutter clean
# 打包ipa
flutter build ipa
# 上传ipa
xcrun altool --upload-app -t ios -f build/ios/ipa/*.ipa -u $user -p $pass