Skip to content

Commit

Permalink
Remove reference to tvOS
Browse files Browse the repository at this point in the history
  • Loading branch information
sbertix committed Aug 22, 2023
1 parent 7ba5e56 commit dd0577f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ extension SystemImageCollection: Codable where Value == String {
/// The version-specific default collection.
public static let `default`: Self = {
let url: URL?
if #available(iOS 17, macOS 14, tvOS 17, watchOS 10, *) {
if #available(iOS 17, macOS 14, watchOS 10, *) {
url = Bundle.module.url(forResource: "symbols5", withExtension: "json")
} else if #available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) {
} else if #available(iOS 16, macOS 13, watchOS 9, *) {
url = Bundle.module.url(forResource: "symbols4", withExtension: "json")
} else {
url = Bundle.module.url(forResource: "symbols3", withExtension: "json")
Expand All @@ -117,9 +117,9 @@ extension SystemImageCollection: Codable where Value == String {
/// The version-specific **UNSECTIONED** default collection.
public static let `unsectionedDefault`: Self = {
let url: URL?
if #available(iOS 17, macOS 14, tvOS 17, watchOS 10, *) {
if #available(iOS 17, macOS 14, watchOS 10, *) {
url = Bundle.module.url(forResource: "symbols5", withExtension: "txt")
} else if #available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) {
} else if #available(iOS 16, macOS 13, watchOS 9, *) {
url = Bundle.module.url(forResource: "symbols4", withExtension: "txt")
} else {
url = Bundle.module.url(forResource: "symbols3", withExtension: "txt")
Expand Down
2 changes: 1 addition & 1 deletion Sources/SystemImagePicker/Components/EmptyState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct EmptyState: View {
var body: some View {
#if compiler(>=5.9)
// Adapt the empty state to the query.
if #available(iOS 17, macOS 14, watchOS 10, tvOS 17, *) {
if #available(iOS 17, macOS 14, watchOS 10, *) {
if !query.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
ContentUnavailableView.search(text: query)
.frame(maxWidth: .infinity, maxHeight: .infinity)
Expand Down
2 changes: 1 addition & 1 deletion Sources/SystemImagePicker/Components/Wrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct Wrapper<Content: View>: View {
/// The underlying view.
var body: some View {
#if !os(macOS)
if #available(iOS 16, macOS 13, watchOS 9, tvOS 16, *) {
if #available(iOS 16, watchOS 9, *) {
NavigationStack {
content().navigationBarTitleDisplayMode(.inline)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public extension SystemImagePickerStyle {
64
#elseif os(macOS)
48
#elseif os(tvOS)
128
#elseif compiler(>=5.9) && os(visionOS)
64
#else
Expand Down
6 changes: 5 additions & 1 deletion Sources/SystemImagePicker/SystemImagePicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
import Foundation
import SwiftUI

#if os(tvOS)
#error("SystemImagePicker is unavailable for tvOS. Please open up a discussion on the GitHub repo if it's a feature you need.")
#endif

/// A `struct` defining a picker utility to select
/// a _SF Symbol_ within a collection.
public struct SystemImagePicker<Selection: Hashable, Value: Hashable>: View {
Expand Down Expand Up @@ -99,7 +103,7 @@ public struct SystemImagePicker<Selection: Hashable, Value: Hashable>: View {
.frame(width: 16.0, height: 16.0)
.contentShape(Circle())
}
.buttonStyle(.borderless)
.buttonStyle(.plain)
}
.padding()
#endif
Expand Down
4 changes: 2 additions & 2 deletions Tests/SystemImagePickerTests/SystemImagePickerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ final class SystemImagePickerTests: XCTestCase {
/// - throws: Any `Error`.
private func loadSystemImages() throws -> Set<String> {
let url: URL?
if #available(iOS 17, macOS 14, tvOS 17, watchOS 10, *) {
if #available(iOS 17, macOS 14, watchOS 10, *) {
url = Bundle.module.url(forResource: "symbols5", withExtension: "txt")
} else if #available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) {
} else if #available(iOS 16, macOS 13, watchOS 9, *) {
url = Bundle.module.url(forResource: "symbols4", withExtension: "txt")
} else {
url = Bundle.module.url(forResource: "symbols3", withExtension: "txt")
Expand Down
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[![Swift](https://img.shields.io/badge/Swift-5.8-%23DE5C43?style=flat&logo=swift)](https://swift.org)
![iOS](https://img.shields.io/badge/iOS-15.0-34c759)
![macOS](https://img.shields.io/badge/macOS-12-34c759)
![tvOS](https://img.shields.io/badge/tvOS-15.0-34c759)
![watchOS](https://img.shields.io/badge/watchOS-8.0-34c759)
![visionOS](https://img.shields.io/badge/visionOS-1.0-34c759)

Expand Down

0 comments on commit dd0577f

Please sign in to comment.