From 61b32ed6964e994764cb2b082034af6a66338361 Mon Sep 17 00:00:00 2001 From: Varun Santhanam Date: Sat, 13 Apr 2024 13:36:13 -0700 Subject: [PATCH] Drop visionOS Support --- Package.swift | 1 - README.md | 2 +- Sources/SafariView/DismissButtonStyle.swift | 2 +- Sources/SafariView/Environment.swift | 2 +- Sources/SafariView/ExcludedActivityTypes.swift | 2 +- Sources/SafariView/IncludedActivities.swift | 2 +- Sources/SafariView/Modifiers.swift | 2 +- .../SafariView/Presentation/BoolPresentation.swift | 2 +- .../Presentation/BoolURLPresentation.swift | 2 +- .../SafariView/Presentation/ItemPresentation.swift | 2 +- .../Presentation/PresentationStyle.swift | 2 +- .../SafariView/Presentation/URLPresentation.swift | 2 +- .../Presentation/WrappedItemPresentation.swift | 2 +- Sources/SafariView/PrewarmingToken.swift | 2 +- Sources/SafariView/SafariView.swift | 14 +++++++------- Sources/WebAuthentication/Modifiers.swift | 2 +- Sources/WebAuthentication/Presentation.swift | 2 +- Sources/WebAuthentication/WebAuthentication.swift | 2 +- 18 files changed, 23 insertions(+), 24 deletions(-) diff --git a/Package.swift b/Package.swift index a536d9a0f..9db66ac5d 100644 --- a/Package.swift +++ b/Package.swift @@ -7,7 +7,6 @@ let package = Package( name: "SafariUI", platforms: [ .iOS(.v14), - .visionOS(.v1), .macCatalyst(.v14) ], products: [ diff --git a/README.md b/README.md index 9830637e0..49a7b7594 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Release](https://img.shields.io/github/v/release/vsanthanam/SafariUI)](https://github.com/vsanthanam/SafariUI/releases) [![Build Status](https://img.shields.io/github/actions/workflow/status/vsanthanam/SafariUI/xcodebuild-build-test.yml)](https://github.com/vsanthanam/SafariUI/actions) [![Swift Version](https://img.shields.io/badge/swift-5.10-critical)](https://swift.org) -[![Supported Platfoms](https://img.shields.io/badge/platforms-iOS_14.0_%7C_visionOS_1.0_%7C_Catalyst_14.0-lightgrey)](https://developer.apple.com) +[![Supported Platfoms](https://img.shields.io/badge/platforms-iOS_14.0_%7C_Catalyst_14.0-lightgrey)](https://developer.apple.com) SwiftUI wrappers for `SFSafariViewController` and `ASWebAuthenticationSession` diff --git a/Sources/SafariView/DismissButtonStyle.swift b/Sources/SafariView/DismissButtonStyle.swift index fc00add25..7b34d93e1 100644 --- a/Sources/SafariView/DismissButtonStyle.swift +++ b/Sources/SafariView/DismissButtonStyle.swift @@ -25,7 +25,7 @@ import SafariServices -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension SafariView { /// An enumeration describing the various dismiss buttons styles available in a ``SafariView`` diff --git a/Sources/SafariView/Environment.swift b/Sources/SafariView/Environment.swift index 7b21b401a..d905f53a7 100644 --- a/Sources/SafariView/Environment.swift +++ b/Sources/SafariView/Environment.swift @@ -25,7 +25,7 @@ import SwiftUI -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension EnvironmentValues { /// The additional activies to include the share sheet displayed inside a ``SafariView`` diff --git a/Sources/SafariView/ExcludedActivityTypes.swift b/Sources/SafariView/ExcludedActivityTypes.swift index 000c8c6c7..c4cb65f8e 100644 --- a/Sources/SafariView/ExcludedActivityTypes.swift +++ b/Sources/SafariView/ExcludedActivityTypes.swift @@ -26,7 +26,7 @@ import Foundation import UIKit -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension SafariView { /// A struct used to exclude activity types from the share sheet of a ``SafariView``. diff --git a/Sources/SafariView/IncludedActivities.swift b/Sources/SafariView/IncludedActivities.swift index 9cc3c6dd5..3f3ac81a8 100644 --- a/Sources/SafariView/IncludedActivities.swift +++ b/Sources/SafariView/IncludedActivities.swift @@ -26,7 +26,7 @@ import Foundation import UIKit -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension SafariView { /// A struct used to include custom activities in the share sheet of a ``SafariView`` diff --git a/Sources/SafariView/Modifiers.swift b/Sources/SafariView/Modifiers.swift index 2edf04cc6..70e0036a2 100644 --- a/Sources/SafariView/Modifiers.swift +++ b/Sources/SafariView/Modifiers.swift @@ -25,7 +25,7 @@ import SwiftUI -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension View { /// Set the automatic reader behavior of safari views within this view diff --git a/Sources/SafariView/Presentation/BoolPresentation.swift b/Sources/SafariView/Presentation/BoolPresentation.swift index d097dd27c..4ca7c3d41 100644 --- a/Sources/SafariView/Presentation/BoolPresentation.swift +++ b/Sources/SafariView/Presentation/BoolPresentation.swift @@ -28,7 +28,7 @@ import SafariServices import SwiftUI import UIKit -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension View { /// Presents a ``SafariView`` when a binding to a Boolean value that you provide is `true`. diff --git a/Sources/SafariView/Presentation/BoolURLPresentation.swift b/Sources/SafariView/Presentation/BoolURLPresentation.swift index 8b3338416..1ac74aed7 100644 --- a/Sources/SafariView/Presentation/BoolURLPresentation.swift +++ b/Sources/SafariView/Presentation/BoolURLPresentation.swift @@ -26,7 +26,7 @@ import Foundation import SwiftUI -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension View { /// Presents a ``SafariView`` when a binding to a Boolean value that you provide is `true`. diff --git a/Sources/SafariView/Presentation/ItemPresentation.swift b/Sources/SafariView/Presentation/ItemPresentation.swift index 2727dff3f..51ea2c449 100644 --- a/Sources/SafariView/Presentation/ItemPresentation.swift +++ b/Sources/SafariView/Presentation/ItemPresentation.swift @@ -28,7 +28,7 @@ import SafariServices import SwiftUI import UIKit -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension View { /// Presents a ``SafariView`` using the given item as a data source for the view’s content. diff --git a/Sources/SafariView/Presentation/PresentationStyle.swift b/Sources/SafariView/Presentation/PresentationStyle.swift index 439a2582f..cedb3935f 100644 --- a/Sources/SafariView/Presentation/PresentationStyle.swift +++ b/Sources/SafariView/Presentation/PresentationStyle.swift @@ -23,7 +23,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension SafariView { /// The available presentation styles of a ``SafariView`` diff --git a/Sources/SafariView/Presentation/URLPresentation.swift b/Sources/SafariView/Presentation/URLPresentation.swift index d0a66a2b7..6d8636d48 100644 --- a/Sources/SafariView/Presentation/URLPresentation.swift +++ b/Sources/SafariView/Presentation/URLPresentation.swift @@ -26,7 +26,7 @@ import Foundation import SwiftUI -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension View { /// Presents a ``SafariView`` using the given URL. diff --git a/Sources/SafariView/Presentation/WrappedItemPresentation.swift b/Sources/SafariView/Presentation/WrappedItemPresentation.swift index 60b69097b..0005d1e35 100644 --- a/Sources/SafariView/Presentation/WrappedItemPresentation.swift +++ b/Sources/SafariView/Presentation/WrappedItemPresentation.swift @@ -25,7 +25,7 @@ import SwiftUI -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension View { /// Presents a ``SafariView`` using the given item as a data source for the view’s content. diff --git a/Sources/SafariView/PrewarmingToken.swift b/Sources/SafariView/PrewarmingToken.swift index d18aaf159..6658e2fec 100644 --- a/Sources/SafariView/PrewarmingToken.swift +++ b/Sources/SafariView/PrewarmingToken.swift @@ -25,7 +25,7 @@ import SafariServices -@available(iOS 15.0, visionOS 1.0, macCatalyst 15.0, *) +@available(iOS 15.0, macCatalyst 15.0, *) public extension SafariView { /// A type created when SafariServices begins prewarming a connection. diff --git a/Sources/SafariView/SafariView.swift b/Sources/SafariView/SafariView.swift index ca4ea8878..ffef8fe97 100644 --- a/Sources/SafariView/SafariView.swift +++ b/Sources/SafariView/SafariView.swift @@ -29,7 +29,7 @@ import SwiftUI import UIKit /// A wrapper for `SFSafariViewController` in SwiftUI -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public struct SafariView: View { // MARK: - Initializers @@ -61,7 +61,7 @@ public struct SafariView: View { /// - onInitialLoad: Closure to execute on initial load /// - onInitialRedirect: Closure to execute on intial redirect /// - onOpenInBrowser: Closure to execute if a user moves from a `SafariView` to `Safari.app` - @available(iOS 15.0, visionOS 1.0, macCatalyst 15.0, *) + @available(iOS 15.0, macCatalyst 15.0, *) public init( url: URL, activityButton: ActivityButton?, @@ -87,7 +87,7 @@ public struct SafariView: View { /// - onInitialLoad: Closure to execute on initial load /// - onInitialRedirect: Closure to execute on intial redirect /// - onOpenInBrowser: Closure to execute if a user moves from a `SafariView` to `Safari.app` - @available(iOS 15.2, visionOS 1.0, macCatalyst 15.2, *) + @available(iOS 15.2, macCatalyst 15.2, *) public init( url: URL, activityButton: ActivityButton? = nil, @@ -105,7 +105,7 @@ public struct SafariView: View { } /// A convenience typealias for [`SFSafariViewController.ActivityButton`](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/activitybutton) - @available(iOS 15.0, visionOS 1.0, macCatalyst 15.0, *) + @available(iOS 15.0, macCatalyst 15.0, *) public typealias ActivityButton = SFSafariViewController.ActivityButton /// Prewarm the connection to a list of provided URLs @@ -120,7 +120,7 @@ public struct SafariView: View { /// /// - Parameter URLs: The URLs to prewarm /// - Returns: A prewarming token for the provided URLs. - @available(iOS 15.0, visionOS 1.0, macCatalyst 15.0, *) + @available(iOS 15.0, macCatalyst 15.0, *) @discardableResult public static func prewarmConnections(to URLs: [URL]) -> PrewarmingToken { let token = SFSafariViewController.prewarmConnections(to: URLs) @@ -128,14 +128,14 @@ public struct SafariView: View { } /// Clears the safari view's cache using [Swift Concurrency](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/concurrency/). - @available(iOS 16.0, visionOS 1.0, macCatalyst 16.0, *) + @available(iOS 16.0, macCatalyst 16.0, *) public static func clearWebsiteData() async { await SFSafariViewController.DataStore.default.clearWebsiteData() } /// Clears the safari view's cache using a completion handler. /// - Parameter completionHandler: Closure to execute after the operation completes - @available(iOS 16.0, visionOS 1.0, macCatalyst 16.0, *) + @available(iOS 16.0, macCatalyst 16.0, *) public static func clearWebsiteData(completionHandler: (() -> Void)?) { SFSafariViewController.DataStore.default.clearWebsiteData(completionHandler: completionHandler) } diff --git a/Sources/WebAuthentication/Modifiers.swift b/Sources/WebAuthentication/Modifiers.swift index 2b94c9cbf..bda194de8 100644 --- a/Sources/WebAuthentication/Modifiers.swift +++ b/Sources/WebAuthentication/Modifiers.swift @@ -25,7 +25,7 @@ import SwiftUI -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension View { /// Set the private authentication requirements for authentication sessions within this view. diff --git a/Sources/WebAuthentication/Presentation.swift b/Sources/WebAuthentication/Presentation.swift index 2743b2219..45706d4a1 100644 --- a/Sources/WebAuthentication/Presentation.swift +++ b/Sources/WebAuthentication/Presentation.swift @@ -25,7 +25,7 @@ import SwiftUI -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public extension View { /// Presents a ``WebAuthentication`` when a binding to a Boolean value that you provide is `true`. diff --git a/Sources/WebAuthentication/WebAuthentication.swift b/Sources/WebAuthentication/WebAuthentication.swift index 9f0547885..0c7fd6f32 100644 --- a/Sources/WebAuthentication/WebAuthentication.swift +++ b/Sources/WebAuthentication/WebAuthentication.swift @@ -27,7 +27,7 @@ import AuthenticationServices import SwiftUI /// A wrapper for `ASWebAuthenticationSession` in SwiftUI -@available(iOS 14.0, visionOS 1.0, macCatalyst 14.0, *) +@available(iOS 14.0, macCatalyst 14.0, *) public struct WebAuthentication { // MARK: - Initializers