IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.framework" failed: No such file or directory (2) while archiving flutter app

huangapple go评论68阅读模式
英文:

IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.framework" failed: No such file or directory (2) while archiving flutter app

问题

我试图归档我的Flutter应用以将其导出到苹果商店。 应用程序可以正常运行,但归档过程失败。

Xcode是我可以下载的最新版本(版本14.3(14E222b))
Flutter已更新

我尝试了以下命令来尝试解决问题:

flutter upgrade
flutter clean
flutter pub get
cd ios
pod deintegrate
rm -f Podfile.lock
pod install
pod update
pod install
sudo gem install cocoapods
sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc

在执行这些命令之后,我进入Xcode,删除DerivedData,清理构建文件夹,将最低部署更改为Pod > FMDB > General > Minimum Deployment > 设置为12.0

现在,我尝试构建一个归档。

大约30秒后,我收到以下错误:

PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-B1164030238D389C328552D1.sh (in target 'Runner' from project 'Runner')
    cd /Users/mateo/Documents/Dev/App-VE-app/ios
    /bin/sh -c /Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-B1164030238D389C328552D1.sh

mkdir -p /Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/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/FMDB.framework" "/Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks"
building file list ... rsync: link_stat "/Users/mateo/Documents/Dev/App-VE-app/ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.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/810eba08-405a-11ed-86e9-6af958a02716/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
英文:

I'm trying to archive my flutter app to export it to the Apple Store.
The app can be run without any problems, but the archiving process result with a fail.

Xcode is at the latest version that i can download (Version 14.3 (14E222b))
Flutter is updated

I've tried theses commands to try to remove the problem :

flutter upgrade
flutter clean
flutter pub get
cd ios
pod deintegrate
rm -f Podfile.lock
pod install
pod update
pod install
sudo gem install cocoapods
sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc

After these commands i go into Xcode, delete DerivedData, Clean Build Folder, change Minimum Deployment into Pod > FMDB > General > Minimum Deployment > set to 12.0

And now I test to build an Archive.

After 30 seconds (average), i've got this error :

PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-B1164030238D389C328552D1.sh (in target 'Runner' from project 'Runner')
    cd /Users/mateo/Documents/Dev/App-VE-app/ios
    /bin/sh -c /Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-B1164030238D389C328552D1.sh

mkdir -p /Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/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/FMDB.framework" "/Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks"
building file list ... rsync: link_stat "/Users/mateo/Documents/Dev/App-VE-app/ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.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/810eba08-405a-11ed-86e9-6af958a02716/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code

答案1

得分: 122

Please open Xcode and click on the "Pods-Runner-frameworks" file in the left panel.

Go to line 44.

Change:

source="$(readlink "${source}")"

to:

source="$(readlink -f "${source}")"

Note: Please don't forget the space after '-f'.

Clean the build folder and run again.

英文:

Please open xcode and click Pods-Runner-frameworks file on left panel.

IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.framework" failed: No such file or directory (2) while archiving flutter app

go to 44. line

source="$(readlink "${source}")"

change to (add -f)

source="$(readlink -f "${source}")"

Note : Please don't forget the space after '-f'

IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.framework" failed: No such file or directory (2) while archiving flutter app

Clean build folder and run again.

答案2

得分: 24

更新 CocoaPods 到 1.12.1。然后执行新的 'pod install'。

英文:

Update cocoapods to 1.12.1. Then do a new 'pod install'

答案3

得分: 1

我认为Greg Anderson的解决方案:https://stackoverflow.com/a/76213903/10917762 是一个可行的方法,因为它可以永久修复这个问题,而且不会在运行pod install后覆盖修复。

然而,对于我来说,简单的brew upgrade cocoapods并不起作用,所以我不得不运行:

gem cleanup
brew uninstall cocoapods
sudo gem uninstall cocoapods
sudo gem install cocoapods -n /usr/local/bin
sudo gem install cocoapods-user-defined-build-types
pod install --repo-update # 在你的XCode项目中运行此命令

解决方案来自:https://stackoverflow.com/a/73403613/10917762

英文:

I think Greg Anderson's solution: https://stackoverflow.com/a/76213903/10917762 is the way to go as it fixes the issue permanently and will not overwrite the fix once you run pod install.

However for me a simple brew upgrade cocoapods did not work so I had to run:

gem cleanup
brew uninstall cocoapods
sudo gem uninstall cocoapods
sudo gem install cocoapods -n /usr/local/bin
sudo gem install cocoapods-user-defined-build-types
pod install --repo-update # run this in your XCode project

The solution is from: https://stackoverflow.com/a/73403613/10917762

答案4

得分: -2

这个问题似乎是最近的,对我来说效果非常好的解决方案是回到 Xcode 14.2。

英文:

This problem seems to be recent and the solution that worked really well for me was to go back to Xcode 14.2.

huangapple
  • 本文由 发表于 2023年4月10日 20:49:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/75977278.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定