clean_ios.sh
668 Bytes
cd /Users/ethanlam/works/gitlab/flutter_pros/appframe.git
# 1. 回到项目根目录
flutter clean
# 2. 进入 ios 目录
cd ios
# 3. 删除构建残留和 Pod 锁文件 (必须删 Lock 文件)
rm -rf Pods
rm -rf Podfile.lock
rm -rf .symlinks
rm -rf Flutter/Flutter.framework
rm -rf Flutter/App.framework
flutter pub get
#pod deintegrate
# 4. 清理 CocoaPods 本地缓存 (这一步很重要,ffmpeg 包很大,容易缓存损坏)
pod cache clean --all
# 5. 重新安装 Pods 并更新仓库索引
# 注意:这一步可能比较慢,因为 ffmpeg 库非常大(几百MB),请保持网络通畅
pod install --repo-update
# 6. 回到根目录
cd ..