gpt4 book ai didi

ios - Carthage 更新失败并显示错误消息 SWIFT_VERSION '5.0' 不受支持,支持的版本为 : 3. 0、4.0、4.2

转载 作者:行者123 更新时间:2023-11-28 13:45:11 25 4
gpt4 key购买 nike

目前我使用的是 xcode 10.1 版和 swift 4.2 版。我正在使用 CryptoSwift 库,当我尝试 carthage update 时,它无法构建并显示错误消息 SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2 .

我正在尝试解决问题:

  1. if swift_verion > 4.2 {
    //Download x version
    }else {
    //Download y version
    }
  2. 或者有什么方法可以只编译可用版本?

Build settings from command line:

CARTHAGE = YES
CLANG_ENABLE_CODE_COVERAGE = NO
CODE_SIGN_IDENTITY =
CODE_SIGNING_REQUIRED = NO
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
ONLY_ACTIVE_ARCH = NO
SDKROOT = iphoneos12.1
SKIP_INSTALL = YES
STRIP_INSTALLED_PRODUCT = NO
TOOLCHAINS = com.apple.dt.toolchain.Swift_4_2

note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'CryptoSwift')

最佳答案

CryptoSwift 库似乎已在其最新版本 (1.0.0) 中使用 Xcode 10.2 更新至 Swift 5。您收到此错误是因为您需要更新您的 Xcode 版本并将您的项目迁移到 Swift 5,如果您想指向这个新版本。使用 Swift 5 的项目只能使用 Xcode 10.2 构建。

请注意,Apple 很快就会放弃对 Swift 3 的支持,因此尽快升级可能是个好主意。在迁移期间管理依赖关系可能会很痛苦,因为您无法控制其他开发团队何时切换。

关于ios - Carthage 更新失败并显示错误消息 SWIFT_VERSION '5.0' 不受支持,支持的版本为 : 3. 0、4.0、4.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55491823/

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