From 8449dd838bcc56ddf725c8b20ed12e1e1b362420 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Mon, 8 May 2023 22:17:29 -0500 Subject: [PATCH 1/2] Fix compiler warnings --- SwiftCharts/Axis/ChartAxisLabel.swift | 4 ++-- SwiftCharts/Axis/ChartAxisModel.swift | 4 ++-- SwiftCharts/Drawers/ChartLabelDrawer.swift | 4 ++-- SwiftCharts/Layers/ChartStackedBarsLayer.swift | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SwiftCharts/Axis/ChartAxisLabel.swift b/SwiftCharts/Axis/ChartAxisLabel.swift index d9916c24..8f3418fc 100644 --- a/SwiftCharts/Axis/ChartAxisLabel.swift +++ b/SwiftCharts/Axis/ChartAxisLabel.swift @@ -53,10 +53,10 @@ open class ChartAxisLabel { extension ChartAxisLabel: CustomDebugStringConvertible { public var debugDescription: String { - return [ + return ([ "text": text, "settings": settings - ] + ] as [String : Any]) .debugDescription } } diff --git a/SwiftCharts/Axis/ChartAxisModel.swift b/SwiftCharts/Axis/ChartAxisModel.swift index 3c4be154..3323e936 100644 --- a/SwiftCharts/Axis/ChartAxisModel.swift +++ b/SwiftCharts/Axis/ChartAxisModel.swift @@ -94,12 +94,12 @@ open class ChartAxisModel { extension ChartAxisModel: CustomDebugStringConvertible { public var debugDescription: String { - return [ + return ([ "firstModelValue": firstModelValue, "lastModelValue": lastModelValue, "axisTitleLabels": axisTitleLabels, - ] + ] as [String : Any]) .debugDescription } } diff --git a/SwiftCharts/Drawers/ChartLabelDrawer.swift b/SwiftCharts/Drawers/ChartLabelDrawer.swift index ad7be42a..42bd1c36 100644 --- a/SwiftCharts/Drawers/ChartLabelDrawer.swift +++ b/SwiftCharts/Drawers/ChartLabelDrawer.swift @@ -41,14 +41,14 @@ public extension ChartLabelSettings { extension ChartLabelSettings: CustomDebugStringConvertible { public var debugDescription: String { - return [ + return ([ "font": font, "fontColor": fontColor, "rotation": rotation, "rotationKeep": rotationKeep, "shiftXOnRotation": shiftXOnRotation, "textAlignment": textAlignment - ] + ] as [String : Any]) .debugDescription } } diff --git a/SwiftCharts/Layers/ChartStackedBarsLayer.swift b/SwiftCharts/Layers/ChartStackedBarsLayer.swift index 9b1b7d4d..82290eca 100644 --- a/SwiftCharts/Layers/ChartStackedBarsLayer.swift +++ b/SwiftCharts/Layers/ChartStackedBarsLayer.swift @@ -33,13 +33,13 @@ open class ChartStackedBarModel: ChartBarModel { } extension ChartStackedBarModel: CustomDebugStringConvertible { - open var debugDescription: String { - return [ + public var debugDescription: String { + return ([ "items": items, "constant": constant, "axisValue1": axisValue1, "axisValue2": axisValue2 - ] + ] as [String : Any]) .debugDescription } } From a785609973905f7516b525f7e4a12f2a31d9c1b9 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Tue, 9 May 2023 07:46:54 -0500 Subject: [PATCH 2/2] Mark library safe for application extensions --- Package.swift | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index df9f2b5e..091607fb 100644 --- a/Package.swift +++ b/Package.swift @@ -12,8 +12,15 @@ let package = Package( targets: [ .target( name: "SwiftCharts", - path: "SwiftCharts" + path: "SwiftCharts", + swiftSettings: [ + .unsafeFlags(["-Xfrontend", "-application-extension"]) + ], + linkerSettings: [ + .unsafeFlags(["-Xlinker", "-application_extension"]) + ] ) + ], swiftLanguageVersions: [.v5] - ) +)