Skip to content

Broken release builds – misconfigured SwiftUI dependency #59

@t0rst

Description

@t0rst

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:

  1. Open DynamicColorExample.xcodeproj in Xcode 11.3
  2. Select target iOSExample + Generic iOS Device
  3. Build
  4. 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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions