Skip to content

Commit

Permalink
macOS support: v11 only. Swift tools bumped to 5.3 (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
willtemperley authored Mar 24, 2021
1 parent 08f0053 commit 5aa8cdf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.build
/Packages
/*.xcodeproj
.swiftpm
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// swift-tools-version:5.1
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SwiftUICharts",
platforms: [
.iOS(.v13), .watchOS(.v6), .macOS(.v10_15)
.iOS(.v13), .watchOS(.v6), .macOS(.v11)
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
Expand Down
6 changes: 5 additions & 1 deletion Sources/SwiftUICharts/Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,15 @@ class HapticFeedback {
static func playSelection() -> Void {
WKInterfaceDevice.current().play(.click)
}
#else
#elseif os(iOS)
//iOS implementation
let selectionFeedbackGenerator = UISelectionFeedbackGenerator()
static func playSelection() -> Void {
UISelectionFeedbackGenerator().selectionChanged()
}
#else
static func playSelection() -> Void {
//No-op
}
#endif
}

0 comments on commit 5aa8cdf

Please sign in to comment.