-
Notifications
You must be signed in to change notification settings - Fork 145
Description
Describe the bug
Since v5.0.0 DynamicColor.framework does not build in release, so breaking release build of host apps. Reproducible in your own demo app.
To Reproduce
Steps to reproduce the behavior:
- Open DynamicColorExample.xcodeproj in Xcode 11.3
- Select target iOSExample + Generic iOS Device
- Build
- Build of DynamicColor.framework fails with error:
~/Dev/External/Graphics/DynamicColor/Sources/SwiftUIColor.swift:30:18: error: use of undeclared type 'Color'
public extension Color {
Expected behavior
build does not fail
Smartphone (please complete the following information):
any
Additional context
Suspect this is because the framework is not declaring correct dependency on SwiftUI.framework - needs to be added as optional linked framework.
This is problematic for projects that do not want to introduce dependency on SwiftUI.
Would also help if you could split your podspec into a basic that excludes SwiftUIColor.swift and a subspec that adds it for those who need it; still leaves Carthage users in a bind. Alternatively, duplicate your targets to provide with & without SwiftUI versions of the frameworks. (No plans here to adopt SwiftUI until its well past version 2.)