由于苹果要求Xcode 升级到 14.3,
升级Xcode 14.3之前,Debug 和 Archive 都没问题;升级 Xcode 14.3之后,Debug 没问题,Archive 就报错。错误信息如下:
building file list ... rsync: link_stat "/Users/xxx/.../AFNetworking.framework" failed: No such file or directory (2)
done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/9e200cfa-7d96-11ed-886f-a23c4f261b56/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/alingavriliuc/Library/Developer/Xcode/DerivedData/Runner-cujzpewjolforngnoxyherjuheln/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-AF6B532C04771866E7662848.sh (in target 'Runner' from project 'Runner')
cd /Users/alingavriliuc/Documents/mdb-flutter-app/frontend/iOS
/bin/sh -c /Users/alingavriliuc/Library/Developer/Xcode/DerivedData/Runner-cujzpewjolforngnoxyherjuheln/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-AF6B532C04771866E7662848.sh
mkdir -p /Users/alingavriliuc/Library/Developer/Xcode/DerivedData/Runner-cujzpewjolforngnoxyherjuheln/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Runner.app/Frameworks
Symlinked...
rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/openssl_grpc.framework" "/Users/alingavriliuc/Library/Developer/Xcode/DerivedData/Runner-cujzpewjolforngnoxyherjuheln/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks"
building file list ... rsync: link_stat "/Users/alingavriliuc/Documents/mdb-flutter-app/frontend/ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/openssl_grpc.framework" failed: No such file or directory (2)
done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
可能遇到的报错二:真机运行报错
Failed to package /Users/apple/Desktop/Git/项目名/flutter_module
image.png
解决
clear Xcode项目
pod Xcode项目
pod install --verbose --no-repo-update
全局搜索 Pods-
image.png
找到.sh后缀的文件
image.png
替换
source="$(readlink "${source}")"
为
source="$(readlink -f "${source}")"
可能遇到的报错三:打包到应用商店报错 “Invalid Bundle. The bundle you.app/Frameworks/App.framework does not support the minimum OS Version specified in the Info.plist.”
报错截图:
image.png
解决方案:在pubspec.yaml文件中打开一下代码
image.png
上传AppStore失败提示“App.framework does not support theminimum OS Version specified in the Info.plist”
报错截图:
image.png
解决方案:
image.png