Flutter iOS – Command PhaseScriptExecution failed with a nonzero exit code – ARCHIVE APP FROM XCODE

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

Flutter iOS - Command PhaseScriptExecution failed with a nonzero exit code - ARCHIVE APP FROM XCODE

问题

当我想从Xcode按下“Archive”按钮时,它会显示以下错误:

Command PhaseScriptExecution failed with a nonzero exit code

我该如何解决这个问题?我尝试了以下步骤:

  • flutter clean
  • flutter pub get
  • flutter pub cache repair
  • 删除 podfile.lock
  • pod install
  • pod update
  • pod repo update
  • pod reintegrate

等等。我还检查了该应用程序可以在模拟器和真实设备上成功运行。但是我无法进行归档,我需要您的帮助,亲爱的社区。

谢谢

完整错误信息:

building file list ... rsync: link_stat "/Users/sahinefe/Documents/Github/kafile-app/ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/device_info_plus.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/aaefcfd1-5c95-11ed-8734-2e32217d8374/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
英文:

When I want to press Archive button from the Xcode, it gives UNRELAVANT this error:

Command PhaseScriptExecution failed with a nonzero exit code

How can I solve this problem? I tried:

flutter clean
flutter pub get
flutter pub cache repair
delete podfile.lock
pod install
pod update
pod repo update
pod reintegrate

and so on. Also I checked that the app can run successfully for both emulator and REAL device. I can not archive it, I need your help dear community.

Thanks

Full Error:

building file list ... rsync: link_stat "/Users/sahinefe/Documents/Github/kafile-app/ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/device_info_plus.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/aaefcfd1-5c95-11ed-8734-2e32217d8374/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code

答案1

得分: 1

这是关于XCode 14.3的问题,您需要更新CocoaPods来解决它:

sudo gem install cocoapods

如果这不起作用,转到/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh,并将

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

替换为

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

编辑和提醒:在更新CocoaPods不起作用的情况下,您需要在每次存档执行之前执行此重命名过程。

英文:

This is an issue with XCode 14.3 and you will need to update cocoapods to fix it:

sudo gem install cocoapods

In case this doesn't work, go to /ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh and replace

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

with

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

Edit and reminder: You need to do this renaming procedure before every archive execution in case updating cocoapods doesn't work

huangapple
  • 本文由 发表于 2023年5月25日 01:09:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/76325926.html
匿名

发表评论

匿名网友

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

确定