最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】swift中用carthage update库SwiftHEXColors出错:CLEAN FAILED

Carthage crifan 2620浏览 0评论

Xcode 升级到8:

Version 8.0 (8A218a)

之后,新建了一个iOS的swift项目

Cartfile配置了:

github “robb/Cartography”

github “DaveWoodCom/XCGLogger” ~> 3.3

github “Alamofire/Alamofire” ~> 3.4

github “thii/SwiftHEXColors”

github “SwiftyJSON/SwiftyJSON”

github “rhodgkins/SwiftHTTPStatusCodes” ~> 3.0

然后命令行中去:

carthage update –platform iOS

结果最后出错:

➜  FreeShadowsocks carthage update –platform iOS

*** Fetching SwiftHTTPStatusCodes

*** Fetching SwiftyJSON

*** Fetching SwiftHEXColors

*** Fetching Alamofire

*** Fetching XCGLogger

*** Fetching Cartography

*** Checking out Alamofire at “3.5.1”

*** Checking out Cartography at “1.0.1”

*** Checking out SwiftHEXColors at “1.0.4”

*** Checking out SwiftHTTPStatusCodes at “3.1.0”

*** Checking out XCGLogger at “Version_3.6.0”

*** Downloading SwiftyJSON.framework binary at “3.1.1”

*** xcodebuild output can be found in /var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/carthage-xcodebuild.sMuHbB.log

*** Building scheme “Alamofire iOS” in Alamofire.xcworkspace

2016-10-14 21:11:56.104 xcodebuild[19669:1654901] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/WCGitTagsPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:11:56.105 xcodebuild[19669:1654901] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:11:56.106 xcodebuild[19669:1654901] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:12:40.730 xcodebuild[20085:1657964] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/WCGitTagsPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:12:40.731 xcodebuild[20085:1657964] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:12:40.731 xcodebuild[20085:1657964] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

*** Building scheme “Cartography-iOS” in Cartography.xcworkspace

2016-10-14 21:13:07.391 xcodebuild[20153:1658566] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/WCGitTagsPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:13:07.391 xcodebuild[20153:1658566] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:13:07.392 xcodebuild[20153:1658566] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:13:22.900 xcodebuild[20251:1659002] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/WCGitTagsPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:13:22.900 xcodebuild[20251:1659002] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:13:22.901 xcodebuild[20251:1659002] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

*** Building scheme “SwiftHEXColors” in SwiftHEXColors.xcodeproj

2016-10-14 21:13:34.065 xcodebuild[20320:1659248] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/WCGitTagsPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:13:34.066 xcodebuild[20320:1659248] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:13:34.066 xcodebuild[20320:1659248] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

** CLEAN FAILED **

The following build commands failed:

    Check dependencies

(1 failure)

** BUILD FAILED **

The following build commands failed:

    Check dependencies

(1 failure)

A shell task (/usr/bin/xcrun xcodebuild -project /Users/crifan/dev/dev_root/crifan/FeeeShadowsocks/FreeShadowsocks/Carthage/Checkouts/SwiftHEXColors/SwiftHEXColors.xcodeproj -scheme SwiftHEXColors -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:

2016-10-14 21:13:34.065 xcodebuild[20320:1659248] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/WCGitTagsPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:13:34.066 xcodebuild[20320:1659248] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

2016-10-14 21:13:34.066 xcodebuild[20320:1659248] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path ‘~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin’ not present in DVTPlugInCompatibilityUUIDs

** CLEAN FAILED **

The following build commands failed:

    Check dependencies

(1 failure)

** BUILD FAILED **

The following build commands failed:

    Check dependencies

(1 failure)

去看官网:

GitHub – thii/SwiftHEXColors: HEX color handling as an extension for UIColor.

好像没啥问题,是直接:

carthage update

啊。

SwiftHEXColors swift 3 CLEAN FAILED

Xcode 8 (b3) + Swift 2.3: Carthage build fails but normal build works. · Issue #1396 · Carthage/Carthage · GitHub

Swift 3 Support · Issue #329 · Haneke/HanekeSwift · GitHub

(Swift 3) Xcode 8 GM not finding the Alamofire framework · Issue #140 · tristanhimmelman/AlamofireObjectMapper · GitHub

单独只去carthage update:

github “thii/SwiftHEXColors”

结果:

错误依旧。

然后去看log:

  FreeShadowsocks cat /var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/carthage-xcodebuild.ldbqdq.log

/usr/bin/xcrun xcodebuild -project /Users/crifan/dev/dev_root/crifan/FeeeShadowsocks/FreeShadowsocks/Carthage/Checkouts/SwiftHEXColors/SwiftHEXColors.xcodeproj -scheme SwiftHEXColors -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean buildBuild settings from command line:

    BITCODE_GENERATION_MODE = bitcode

    CARTHAGE = YES

    CODE_SIGN_IDENTITY =

    CODE_SIGNING_REQUIRED = NO

    ONLY_ACTIVE_ARCH = NO

    SDKROOT = iphoneos10.0

=== CLEAN TARGET SwiftHEXColors OF PROJECT SwiftHEXColors 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 TARGET SwiftHEXColors OF PROJECT SwiftHEXColors 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.

➜  FreeShadowsocks

看到提示说是:

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

-》难道要SwiftHEXColors自己去指定对应的swift 3版本才可以?

thii/SwiftHEXColors – Travis CI

-》设置为:

swift-2.3

好像是可以编译OK的?

参考:

Xcode 8 (b3) + Swift 2.3: Carthage build fails but normal build works. · Issue #1396 · Carthage/Carthage · GitHub

-》好像是这样的写法?

github “Alamofire/Alamofire” “swift2.3”

搜:

Use Legacy Swift Language Version SWIFT_VERSION is required to be configured

SwiftHEXColors

SwiftHEXColors swift 3 Use Legacy Swift Language Version SWIFT_VERSION is required to be configured

SwiftHEXColors  Use Legacy Swift Language Version SWIFT_VERSION is required to be configured

How to use hex colour values in Swift, iOS – Stack Overflow

Xcode 8 的 6 大新功能一览 – CocoaChina_让移动开发更简单

“Xcode 8 中新创建的项目默认地使用Swift 3, 幸运地Xcode 8 在编译设置中支持开发者明确地选择Swift 2或Swift 2.3 进行编译。

xc8-01.jpg

支持Swift语言以往版本

这就是说你可以选择适合的时候迁移项目到Swift 3, 如果一个目标(Target)需要支持Swift 2.3, 需要在目标(Target)的编译设置里把Use Legacy Swift Language Version 设置成Yes。”

carthage Use Legacy Swift Language Version SWIFT_VERSION is required to be configured

carthage build error on Xcode 8 beta 3 · Issue #3889 · realm/realm-cocoa · GitHub

试试:

carthage update –platform iOS –no-use-binaries

果然,错误依旧。

Won’t compile with Carthage due to SWIFT_VERSION in Xcode 8 beta 6 · Issue #766 · CocoaLumberjack/CocoaLumberjack · GitHub

Pin CocoaLumberjackSwift to Swift 2.3 to allow compilation on Xcode 8. by jbmorley · Pull Request #747 · CocoaLumberjack/CocoaLumberjack · GitHub

-》像之前一样,用:”swift2.3″?

Pin CocoaLumberjackSwift to Swift 2.3 for other targets too by brendonjustin · Pull Request #773 · CocoaLumberjack/CocoaLumberjack · GitHub

“Specify use of Swift 2.3, fixing compilation for iOS in Xcode 8”

去试试:

https://github.com/thii/SwiftHEXColors

即:Cartfile中:

<code>github "thii/SwiftHEXColors" "swift-2.3"
</code>

然后再去update即可:

<code>➜  FreeShadowsocks carthage update --platform iOS --no-use-binaries
*** Fetching SwiftHEXColors
*** Checking out SwiftHEXColors at "6dcd6589c6d5983ee3d374500832aaba46755c97"
*** xcodebuild output can be found in /var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/carthage-xcodebuild.GvK8H4.log
*** Building scheme "SwiftHEXColors" in SwiftHEXColors.xcodeproj
2016-10-14 21:32:59.942 xcodebuild[21021:1694303] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/WCGitTagsPlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-10-14 21:32:59.942 xcodebuild[21021:1694303] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-10-14 21:32:59.943 xcodebuild[21021:1694303] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-10-14 21:33:08.527 xcodebuild[21076:1694682] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/WCGitTagsPlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-10-14 21:33:08.528 xcodebuild[21076:1694682] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-10-14 21:33:08.528 xcodebuild[21076:1694682] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
</code>

就不报错了

【总结】

看来SwiftHEXColors这个库也是不太兼容此处这个

Xcode  8.0 (8A218a)

默认的配置:

<code>github "thii/SwiftHEXColors"
</code>

会使用其最新的swift-3.0的分支-》无法通过Carthage的编译

-》换成swift-2.3:

<code>github "thii/SwiftHEXColors" "swift-2.3"
</code>

就可以通过carthage的编译:

<code>carthage update --platform iOS --no-use-binaries
</code>

了。

->

参考:

Carthage fails to build Swift 2.3 targets in Xcode 8 beta 4 · Issue #1415 · Carthage/Carthage · GitHub

-》内部应该是:

调用编译命令

/usr/bin/xcrun xcodebuild

中添加了

SWIFT_VERSION=2.3

参数。

转载请注明:在路上 » 【已解决】swift中用carthage update库SwiftHEXColors出错:CLEAN FAILED

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
85 queries in 0.197 seconds, using 22.11MB memory