Skip to content

Commit

Permalink
Support visionOS & tvOS
Browse files Browse the repository at this point in the history
  • Loading branch information
divadretlaw committed Feb 28, 2024
1 parent 0fa37fa commit b05b8db
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ playground.xcworkspace
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
Expand Down
23 changes: 0 additions & 23 deletions Package.resolved

This file was deleted.

10 changes: 7 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
// swift-tools-version: 5.7
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "WindowKit",
platforms: [.iOS(.v14)],
platforms: [
.iOS(.v14),
.tvOS(.v14),
.visionOS(.v1)
],
products: [
.library(
name: "WindowKit",
targets: ["WindowKit"]
)
],
dependencies: [
.package(url: "https://github.com/divadretlaw/WindowSceneReader", from: "2.2.0")
.package(url: "https://github.com/divadretlaw/WindowSceneReader", from: "3.0.0")
],
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public struct WindowOverlayConfiguration {
}

var color: Color {
if #available(iOS 15.0, *) {
if #available(iOS 15.0, tvOS 15.0, *) {
Color(uiColor: tintColor)
} else {
Color(tintColor)
Expand All @@ -50,7 +50,7 @@ public struct WindowOverlayConfiguration {

private extension UIColor {
static var defaultColor: UIColor {
if #available(iOS 15.0, *) {
if #available(iOS 15.0, tvOS 15.0, *) {
return .tintColor
} else {
return UIColor(named: "AccentColor", in: .main, compatibleWith: nil) ?? .systemBlue
Expand Down

0 comments on commit b05b8db

Please sign in to comment.