Skip to content

BuildFix: fix build as part of SPM#4550

Closed
ArthurValiev wants to merge 1 commit intoChartsOrg:masterfrom
ArthurValiev:bugfix/spm_build_fix
Closed

BuildFix: fix build as part of SPM#4550
ArthurValiev wants to merge 1 commit intoChartsOrg:masterfrom
ArthurValiev:bugfix/spm_build_fix

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