在更新1.22.5之后 在項目目錄下執(zhí)行 flutter build ios ,報以下錯誤
Your Xcode project requires migration. See https://flutter.dev/docs/development/ios-project-migration for details.
官方的解決方式是刪除項目中的 app.framework和flutter.framework
于是

image.png

image.png
在這兩處確定已經(jīng)沒有app.framework 和 flutter.framework
除此之外 如果依然提示之前的報錯
再檢查 ios/項目/Frameworks 目錄下是否還有 app.framework 和 flutter.framework 這兩個依賴

image.png
有的話也刪除
不出意外到這里已經(jīng)可以執(zhí)行命令了
但是用 Product/Archive 打包依然報錯

image.png
還是報錯 backend.sh不存在, 這個sh是在run script中指定的
路徑是 ‘Flutter_Root/xx/xx’, 可能是指定的常量有誤
xcode12看看新增的User-Defied設(shè)置
之前只有debug配了值 全賦值一下就好了

image.png
到這已經(jīng)可以正常打包了
不過我們的項目用了extension(A), 之前的依賴方式是錯誤的, 用A直接依賴主工程的pods, 現(xiàn)在才發(fā)現(xiàn)pods是支持共用依賴的
target '主工程名' do
pod 'xxx', '~> x.0'
pod 'xxx', '~> x.0'
use_frameworks!
end
target 'extension_A' do
pod 'xxx', '~> x.0'
pod 'xxx', '~> x.0'
use_frameworks!
end
然后pod update一下 如果被墻了可以配下臨時代理
export http_proxy=http://127.0.0.1:10887;
export https_proxy=http://127.0.0.1:10887;
再pod update就可以了
代理記得關(guān)
unset http_proxy
unset https_proxy