Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop visionOS Support #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ let package = Package(
name: "SafariUI",
platforms: [
.iOS(.v14),
.visionOS(.v1),
.macCatalyst(.v14)
],
products: [
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion Sources/SafariView/DismissButtonStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down
2 changes: 1 addition & 1 deletion Sources/SafariView/Environment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down
2 changes: 1 addition & 1 deletion Sources/SafariView/ExcludedActivityTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SafariView/IncludedActivities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down
2 changes: 1 addition & 1 deletion Sources/SafariView/Modifiers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Sources/SafariView/Presentation/BoolPresentation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SafariView/Presentation/BoolURLPresentation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SafariView/Presentation/ItemPresentation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SafariView/Presentation/PresentationStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down
2 changes: 1 addition & 1 deletion Sources/SafariView/Presentation/URLPresentation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SafariView/PrewarmingToken.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions Sources/SafariView/SafariView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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?,
Expand All @@ -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,
Expand All @@ -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
Expand All @@ -120,22 +120,22 @@ 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)
return .init(token, urls: URLs)
}

/// 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)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/WebAuthentication/Modifiers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Sources/WebAuthentication/Presentation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion Sources/WebAuthentication/WebAuthentication.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading