gpt4 book ai didi

swift - xcodebuild : Returned an unsuccessful exit code

转载 作者:搜寻专家 更新时间:2023-10-31 22:59:20 28 4
gpt4 key购买 nike

pod spec lint BSTableViewReorder.podspec --verbose 后出现以下错误:

=== CLEAN TARGET BSTableViewReorder OF PROJECT Pods WITH CONFIGURATION Release ===Check dependencies“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.** CLEAN FAILED **The following build commands failed:    Check dependencies(1 failure)=== BUILD TARGET BSTableViewReorder OF PROJECT Pods WITH CONFIGURATION Release ===Check dependencies“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.** BUILD FAILED **The following build commands failed:    Check dependencies(1 failure) -> BSTableViewReorder (1.4.3)    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.Analyzed 1 podspec.[!] The spec did not pass validation, due to 1 error.

有什么解决方法吗?

最佳答案

2016 年 10 月 22 日更新

我已经安装了 CocoaPods 1.1.1 并发现下面的建议无需安装预发布版本即可工作。换句话说,明确设置 Swift 版本的更改现在与 CP 的发布版本合并。


答案是在 pod 规范 lint 期间明确处理您正在构建的框架的 Swift 版本。

如果您的源代码使用的是 Swift 3.0,那么这里是解决方案。如果您的源代码使用的是 Swift 2.3,那么您可以通过构建最新的 CocoaPods from its GitHub repository 来解决错误。 .进一步查看我的回答。


解决方案是将名为 .swift-version 的文本文件添加到包含 podspec 的元数据文件夹中。

文件的内容应该如下所示。

--- START OF FILE ---
3.0

--- END OF FILE ---

有关源代码的更改,请参阅 Merge of PR #5841在 CocoaPods 存储库中。


我从源代码构建了 CocoaPods 来让它工作。我使用了以下命令。

$ git clone git@github.com:CocoaPods/CocoaPods.git
$ bundle install

据我所知,在最新的预发布版本 1.1.0.rc.1 中尚不支持 .swift-version

关于swift - xcodebuild : Returned an unsuccessful exit code,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39143455/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com