Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BuildFix: fix build as part of SPM #4550

Closed
wants to merge 1 commit into from
Closed

BuildFix: fix build as part of SPM #4550

wants to merge 1 commit into from

Conversation

ArthurValiev
Copy link

Issue Link πŸ”—

#4016

Goals ⚽

  • During transition from CocoaPods to SPM, I've noticed multiple build failures originating from within Charts project
  • The fixes seem trivial enough (missing imports, typos)

Changes

  • The most visible and common failure was that "NSTextAlignment" was failing to be located when building for iOS as target. (missing "import UIKit"). I'e made this import conditional based on the target OS. UIKit is imported for iOS and tvOS, AppKit is imported instead for macOS.
  • "AxisRendererBase.swift" had two typos in "roundedToNextSignificant" call.
  • Also "AxisRendererBase.swift" did not conform to "Renderer" protocol properly. Fixed as suggested by Xcode.

Testing Details πŸ”

Performed some very basic testing by replacing the remote SPM dependency with a local one and adding it as a dependency to 3 projects that target macOS, tvOS and iOS. Build now successfully passes.
Tested basic graph cases in my own iOS project. Works fine in my use case.

@ArthurValiev
Copy link
Author

Found one open similar PR #4539 which fixes missing imports but that one does not includes fixes for macOS. Build fails with macOS as target with missing AppKit.

@jjatie
Copy link
Collaborator

jjatie commented Jan 12, 2021

Resolved by #4553

@jjatie jjatie closed this Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants