ivnsch / SwiftCharts

Easy to use and highly customizable charts library for iOS
Apache License 2.0
2.53k stars 410 forks source link

Add explicit UIKit and CoreGraphics imports #419

Closed ps2 closed 3 years ago

ps2 commented 3 years ago

This PR fixes an issue with using SwiftCharts from another package.

I am developing another package with SwiftCharts as a dependency, like this:

dependencies: [
        .package(url: "https://github.com/i-schuetz/SwiftCharts.git", .branch("master"))
    ],

When building this package, Xcode does not appear to include the "SwiftCharts/Supporting Files/SwiftCharts.h" file, and so all the references to CGFloat, UIFont, etc are unresolved. Making the import of UIKit or CoreGraphics explicit solves this issue.

bmalbuck commented 3 years ago

Thanks for fixing this issue. I am now referencing this fork in my project to work around this compile error. Although explicit import of UIKit and CoreGraphics seems clunky and that there is a better solution to include SwiftCharts.h public header.

ivnsch commented 3 years ago

Sorry for being so late, I was not getting all notifications.