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

inconsistent include of UIKit vs AppKit #3362

Closed
solas opened this issue Mar 23, 2018 · 2 comments
Closed

inconsistent include of UIKit vs AppKit #3362

solas opened this issue Mar 23, 2018 · 2 comments

Comments

@solas
Copy link

solas commented Mar 23, 2018

What did you do?

It appears this project grabs many UI object definitions (e.g. NSTextAlignment) through Charts.h, yet includes for iOS UIKit separately in many files:

#if !os(OSX)
import UIKit
#endif

Either Charts.h should include all, else the above swift import should be changed to the following, and perhaps imported in a separate included swift module to avoid duplication:

#if !os(OSX)
import UIKit
#else
import AppKit
#endif

Charts Environment

Charts version/Branch/Commit Number:
3.1
Xcode version:
9.2
Swift version:
4.0
Platform(s) running Charts:
macOS
macOS version running Xcode:
10.13.3

@liuxuan30
Copy link
Member

I'm not clear what's your issue. Have checked Charts-OSX demo? And, better to provide a PR to demonstrate. You are the FIRST one reporting this.

@jjatie
Copy link
Collaborator

jjatie commented Apr 1, 2018

I'm not sure what the issue is either. Most, if not all, of the

#if !os(OSX)
import UIKit
#endif

are leftover from older versions of the library and can be removed. They don't impact anything as the UIKit and AppKit imports are done in Platform.swift

@jjatie jjatie closed this as completed Apr 1, 2018
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

No branches or pull requests

3 participants