DynamicColor
DynamicColor copied to clipboard
Carthage build fails for version 5.0.0
I've been unsuccessfully trying to add this project as a Carthage dependency. In the console I get:
*** Building scheme "DynamicColor" in DynamicColorExample.xcodeproj
Build Failed
Task failed with exit code 65:
...
And the file clearly prints out the error:
/Users/mario/Projects/tests/DCTest/Carthage/Checkouts/DynamicColor/Sources/SwiftUIColor.swift:30:18: error: use of undeclared type 'Color'
public extension Color {
^~~~~
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
CompileSwift normal armv7
(3 failures)
To Reproduce Steps to reproduce the behavior:
- Add
github "yannickl/DynamicColor" >= 5.0.01
in Cartfile - Run
carthage bootstrap/update
- See error
Expected behavior A clear and concise description of what you expected to happen.
Smartphone (please complete the following information):
- Carthage version: 0.34.0
- MacOS: tried on Mojave and Catalina
Additional context I did try to debug the error, but I failed. The line in question is using the struct from SwiftUI, and it's enclosed with @available attribute, but still it somehow fails 🤷♂
+1
Any update? It looks like the same error.
/Carthage/Checkouts/DynamicColor/Sources/SwiftUIColor.swift:27:8: error: no such module 'SwiftUI' import SwiftUI ^
** ARCHIVE FAILED **
The following build commands failed: CompileSwift normal armv7 CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler CompileSwift normal arm64
In a release build, I get...
~/Dev/DynamicColor/Sources/SwiftUIColor.swift:30:18: error: use of undeclared type 'Color'
public extension Color {
My app deployment target is iOS 11, but Color
is not available until iOS 13 — swift header with Xcode 11.3:
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
public struct Color : Hashable, CustomStringConvertible {
I would guess Carthage build is just obscuring the underlying cause. (The project I am working on is using CocoaPods.)
I submitted Issue #59: Broken release builds – misconfigured SwiftUI dependency — it's not a Carthage problem.