我目前正在开发一个 Flutter 项目,并不断在 Xcode Cloud 中遇到构建错误。 当在 iOS 模拟器上本地运行时,构建成功,但在我提交到 GitHub 后,它在 Xcode Cloud 中构建,并且出现以下错误:
Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-resources-Release-input-files.xcfilelist'
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig' in search paths
Release.xcconfig:4
could not find included file 'Generated.xcconfig' in search paths
Release.xcconfig:2
could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig' in search paths
Release.xcconfig:3
Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Release-input-files.xcfilelist'
Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-resources-Release-output-files.xcfilelist'
Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Release-output-files.xcfilelist'
我尝试向我的目标添加一个脚本来安装 CocoaPods 的依赖项,但它没有任何改变。
然后我更新了脚本,但没有效果。
最后我在克隆后脚本下尝试了https://docs.flutter.dev/deployment/cd#xcode-cloud中的说明,但没有任何作用。
每个构建都有相同的 7 个错误
我认为您应该将脚本放置在
ios/ci_scripts/ci_post_clone.sh
,如 克隆后脚本 指示:
在
处创建一个文件并添加以下内容。ios/ci_scripts/ci_post_clone.sh
还需要:
此文件应添加到您的 git 存储库并标记为可执行文件。
$ git add --chmod=+x ios/ci_scripts/ci_post_clone.sh