首页 > 解决方案 > 无法在 iOS 12 上使用 SwiftyJSON 构建项目

问题描述

你做了什么?

  1. 使用迦太基
  2. 这是我在 Cartfile 中的命令。github "SwiftyJSON/SwiftyJSON" ~> 4.0
  3. 在 iOS 12 模拟器上构建项目

你期望会发生什么?

项目应该成功构建。

实际上发生了什么?

项目未成功构建。XCode 显示以下错误。

ld: /Users/xxxxxx/Desktop/Test12/Carthage/Build/iOS/SwiftyJSON.framework/SwiftyJSON compiled with older version of Swift language (4.0) than previous files (unknown ABI version 0x06) file '/Users/xxxxxx/Desktop/Test12/Carthage/Build/iOS/SwiftyJSON.framework/SwiftyJSON' for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

环境

列出您正在使用的软件版本:

在 Github 上用 SwiftyJSON 提出这个问题之前,只是想看看是否有人有类似的问题。

标签: iosswiftswifty-jsonios12

解决方案


To whoever checking this post, I resolved this by doing the below 3 things:

  1. Changed the command line tools version to Xcode 10

  2. Changed the Swift version on Build Settings to 4.2

  3. Deleted the carthage folders and ran 'carthage update' once again.


推荐阅读