diff --git a/Auth0.podspec b/Auth0.podspec index 11d54295..58f5b76d 100644 --- a/Auth0.podspec +++ b/Auth0.podspec @@ -33,7 +33,7 @@ Pod::Spec.new do |s| s.version = '2.8.0' s.summary = "Auth0 SDK for Apple platforms" s.description = <<-DESC - Auth0 SDK for iOS, macOS, tvOS, and watchOS apps. + Auth0 SDK for iOS, macOS, tvOS, watchOS and visionOS apps. DESC s.homepage = 'https://github.com/auth0/Auth0.swift' s.license = 'MIT' diff --git a/Auth0/Telemetry.swift b/Auth0/Telemetry.swift index 2befabb9..f860c8e2 100644 --- a/Auth0/Telemetry.swift +++ b/Auth0/Telemetry.swift @@ -85,6 +85,8 @@ public struct Telemetry { return "tvOS" #elseif os(watchOS) return "watchOS" + #elseif os(visionOS) + return "visionOS" #else return "unknown" #endif diff --git a/Auth0Tests/CredentialsManagerSpec.swift b/Auth0Tests/CredentialsManagerSpec.swift index c43676fe..9da24964 100644 --- a/Auth0Tests/CredentialsManagerSpec.swift +++ b/Auth0Tests/CredentialsManagerSpec.swift @@ -441,8 +441,8 @@ class CredentialsManagerSpec: QuickSpec { } } } - - #if os(iOS) +nti + #if os(iOS) || os(visionOS) context("require biometrics") { it("should error when biometrics are unavailable") { diff --git a/Auth0Tests/TelemetrySpec.swift b/Auth0Tests/TelemetrySpec.swift index d44420b8..2d70443d 100644 --- a/Auth0Tests/TelemetrySpec.swift +++ b/Auth0Tests/TelemetrySpec.swift @@ -57,6 +57,8 @@ class TelemetrySpec: QuickSpec { expect(env["tvOS"]).toNot(beNil()) #elseif os(watchOS) expect(env["watchOS"]).toNot(beNil()) + #elseif os(visionOS) + expect(env["visionOS"]).toNot(beNil()) #else expect(env["unknown"]).toNot(beNil()) #endif @@ -104,6 +106,8 @@ class TelemetrySpec: QuickSpec { expect(env["tvOS"]).toNot(beNil()) #elseif os(watchOS) expect(env["watchOS"]).toNot(beNil()) + #elseif os(visionOS) + expect(env["visionOS"]).toNot(beNil()) #else expect(env["unknown"]).toNot(beNil()) #endif diff --git a/Auth0Tests/WebAuthSpec.swift b/Auth0Tests/WebAuthSpec.swift index 7b95d8b2..815056c7 100644 --- a/Auth0Tests/WebAuthSpec.swift +++ b/Auth0Tests/WebAuthSpec.swift @@ -324,7 +324,7 @@ class WebAuthSpec: QuickSpec { #endif #if compiler(>=5.10) - if #available(iOS 17.4, macOS 14.4, *) { + if #available(iOS 17.4, macOS 14.4, visionOS 1.2, *) { context("https") { it("should build with the domain") { expect(newWebAuth().useHTTPS().redirectURL?.absoluteString) == "https://\(Domain)/\(platform)/\(bundleId)/callback" @@ -485,7 +485,7 @@ class WebAuthSpec: QuickSpec { } - #if os(iOS) + #if os(iOS) || os(visionOS) describe("login") { var auth: Auth0WebAuth! diff --git a/Auth0Tests/WebAuthSpies.swift b/Auth0Tests/WebAuthSpies.swift index e8ee5ff9..343d4178 100644 --- a/Auth0Tests/WebAuthSpies.swift +++ b/Auth0Tests/WebAuthSpies.swift @@ -49,7 +49,7 @@ class SpyTransaction: AuthTransaction { } -#if os(iOS) +#if os(iOS) || os(visionOS) import UIKit import SafariServices @@ -66,7 +66,9 @@ class SpyViewController: UIViewController { } } +#endif +#if os(iOS) class SpySafariViewController: SFSafariViewController { var isPresented = false