Skip to content

Commit

Permalink
Merge pull request #4017 from rynecheow/hotfix/spm-compile-error
Browse files Browse the repository at this point in the history
Fix Swift Package Manager compile issue
  • Loading branch information
liuxuan30 authored Sep 20, 2019
2 parents e93bfb9 + 7d1296d commit 593630e
Show file tree
Hide file tree
Showing 54 changed files with 242 additions and 33 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ fastlane/test_output
Carthage
Charts.framework.zip
ChartsRealm.framework.zip
.swiftpm/
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Objective-C/Components/BalloonMarker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

import Foundation
import Charts

#if canImport(UIKit)
import UIKit
#endif

open class BalloonMarker: MarkerImage
{
Expand Down
3 changes: 3 additions & 0 deletions ChartsDemo-iOS/Objective-C/Components/RadarMarkerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

import Foundation
import Charts
#if canImport(UIKit)
import UIKit
#endif

open class RadarMarkerView: MarkerView
{
Expand Down
3 changes: 3 additions & 0 deletions ChartsDemo-iOS/Objective-C/Components/XYMarkerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

import Foundation
import Charts
#if canImport(UIKit)
import UIKit
#endif

open class XYMarkerView: BalloonMarker
{
Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
Expand Down
3 changes: 3 additions & 0 deletions ChartsDemo-iOS/Swift/Components/BalloonMarker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

import Foundation
import Charts
#if canImport(UIKit)
import UIKit
#endif

open class BalloonMarker: MarkerImage
{
Expand Down
3 changes: 3 additions & 0 deletions ChartsDemo-iOS/Swift/Components/RadarMarkerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

import Foundation
import Charts
#if canImport(UIKit)
import UIKit
#endif

public class RadarMarkerView: MarkerView {
@IBOutlet var label: UILabel!
Expand Down
3 changes: 3 additions & 0 deletions ChartsDemo-iOS/Swift/Components/XYMarkerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

import Foundation
import Charts
#if canImport(UIKit)
import UIKit
#endif

public class XYMarkerView: BalloonMarker {
public var xAxisValueFormatter: IAxisValueFormatter
Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/DemoBaseViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

enum Option {
Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/DemoListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif

private struct ItemDef {
let title: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class AnotherBarChartViewController: DemoBaseViewController {
Expand Down
7 changes: 6 additions & 1 deletion ChartsDemo-iOS/Swift/Demos/BarChartViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts
#if canImport(UIKit)
import UIKit
#endif

class BarChartViewController: DemoBaseViewController {

Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/Demos/BubbleChartViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class BubbleChartViewController: DemoBaseViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class CandleStickChartViewController: DemoBaseViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class ColoredLineChartViewController: DemoBaseViewController {
Expand Down
7 changes: 6 additions & 1 deletion ChartsDemo-iOS/Swift/Demos/CombinedChartViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts
#if canImport(UIKit)
import UIKit
#endif

private let ITEM_COUNT = 12

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

private class CubicLineSampleFillFormatter: IFillFormatter {
Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/Demos/HalfPieChartViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class HalfPieChartViewController: DemoBaseViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class HorizontalBarChartViewController: DemoBaseViewController {
Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/Demos/LineChart1ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class LineChart1ViewController: DemoBaseViewController {
Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/Demos/LineChart2ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class LineChart2ViewController: DemoBaseViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class LineChartFilledViewController: DemoBaseViewController {
Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/Demos/LineChartTimeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class LineChartTimeViewController: DemoBaseViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class MultipleBarChartViewController: DemoBaseViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class MultipleLinesChartViewController: DemoBaseViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class NegativeStackedBarChartViewController: DemoBaseViewController {
Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/Demos/PieChartViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class PieChartViewController: DemoBaseViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class PiePolylineChartViewController: DemoBaseViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class PositiveNegativeBarChartViewController: DemoBaseViewController {
Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/Demos/RadarChartViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class RadarChartViewController: DemoBaseViewController {
Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/Demos/ScatterChartViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class ScatterChartViewController: DemoBaseViewController {
Expand Down
4 changes: 3 additions & 1 deletion ChartsDemo-iOS/Swift/Demos/SinusBarChartViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class SinusBarChartViewController: DemoBaseViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2017 jc. All rights reserved.
//

import UIKit
#if canImport(UIKit)
import UIKit
#endif
import Charts

class StackedBarChartViewController: DemoBaseViewController {
Expand Down
16 changes: 11 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
// swift-tools-version:4.0
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription

let package = Package(
name: "Charts",
platforms: [
.iOS(.v8),
.tvOS(.v9),
.macOS(.v10_11),
],
products: [
.library(name: "Charts", type: .dynamic, targets: ["Charts"])
.library(
name: "Charts",
targets: ["Charts"]),
],
dependencies: [],
targets: [
.target(name: "Charts", dependencies: [])
.target(name: "Charts")
],
swiftLanguageVersions: [5]
swiftLanguageVersions: [.v5]
)
1 change: 1 addition & 0 deletions Source/Charts/Animation/Animator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import Foundation
import CoreGraphics
import QuartzCore

@objc(ChartAnimatorDelegate)
public protocol AnimatorDelegate
Expand Down
Loading

0 comments on commit 593630e

Please sign in to comment.