Skip to content

Commit 27871d3

Browse files
atierianharsh62
authored andcommitted
fix: update xrOS --> visionOS in os directive checks
1 parent fd269e5 commit 27871d3

File tree

67 files changed

+198
-95
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+198
-95
lines changed

Amplify/Categories/Auth/AuthCategory+ClientBehavior.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extension AuthCategory: AuthCategoryBehavior {
3636
return try await plugin.signIn(username: username, password: password, options: options)
3737
}
3838

39-
#if os(iOS) || os(macOS)
39+
#if os(iOS) || os(macOS) || os(visionOS)
4040
public func signInWithWebUI(
4141
presentationAnchor: AuthUIPresentationAnchor? = nil,
4242
options: AuthWebUISignInRequest.Options? = nil) async throws -> AuthSignInResult {

Amplify/Categories/Auth/AuthCategoryBehavior.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77

88
import Foundation
9-
#if os(iOS) || os(macOS)
9+
#if os(iOS) || os(macOS) || os(visionOS)
1010
import AuthenticationServices
1111
public typealias AuthUIPresentationAnchor = ASPresentationAnchor
1212
#endif
@@ -66,7 +66,7 @@ public protocol AuthCategoryBehavior: AuthCategoryUserBehavior, AuthCategoryDevi
6666
password: String?,
6767
options: AuthSignInRequest.Options?) async throws -> AuthSignInResult
6868

69-
#if os(iOS) || os(macOS)
69+
#if os(iOS) || os(macOS) || os(visionOS)
7070
/// SignIn using pre configured web UI.
7171
///
7272
/// Calling this method will always launch the Auth plugin's default web user interface

Amplify/Categories/Auth/Request/AuthSignOutRequest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public extension AuthSignOutRequest {
3232
/// SignOut the user from all devices. Check the plugin specific definition on what global signOut means.
3333
public let globalSignOut: Bool
3434

35-
#if os(iOS) || os(macOS)
35+
#if os(iOS) || os(macOS) || os(visionOS)
3636
/// Provide a presentation anchor if you have signedIn using `signInWithWebUI`. The signOut webUI will be presented
3737
/// in the presentation anchor provided.
3838
public let presentationAnchorForWebUI: AuthUIPresentationAnchor?
@@ -54,7 +54,7 @@ public extension AuthSignOutRequest {
5454

5555
}
5656

57-
#if os(iOS) || os(macOS)
57+
#if os(iOS) || os(macOS) || os(visionOS)
5858
extension AuthSignOutRequest.Options {
5959
public static func presentationAnchor(_ anchor: AuthUIPresentationAnchor) -> AuthSignOutRequest.Options {
6060
return AuthSignOutRequest.Options(presentationAnchor: anchor)

Amplify/Categories/Auth/Request/AuthWebUISignInRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0
66
//
77

8-
#if os(iOS) || os(macOS)
8+
#if os(iOS) || os(macOS) || os(visionOS)
99
import Foundation
1010

1111
/// Request to initiate sign in using a web UI.

Amplify/Core/Support/DeviceInfo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public struct DeviceInfo {
118118
///
119119
/// - Tag: DeviceInfo.screenBounds
120120
public var screenBounds: CGRect {
121-
#if os(xrOS)
121+
#if os(visionOS)
122122
.zero
123123
#elseif canImport(WatchKit)
124124
.zero

Amplify/DevMenu/Amplify+DevMenu.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Foundation
99

1010
/// Extension of `Amplify` for supporting Developer Menu feature
1111
extension Amplify {
12-
#if os(iOS) && !os(xrOS)
12+
#if os(iOS) && !os(visionOS)
1313
static var devMenu: AmplifyDevMenu?
1414

1515
@MainActor
@@ -30,7 +30,7 @@ extension Amplify {
3030

3131
/// Returns a `PersistentLoggingPlugin` if developer menu feature is enabled in debug mode
3232
static func getLoggingCategoryPlugin(loggingPlugin: LoggingCategoryPlugin) -> LoggingCategoryPlugin {
33-
#if os(iOS) && !os(xrOS)
33+
#if os(iOS) && !os(visionOS)
3434
#if DEBUG
3535
if isDevMenuEnabled() {
3636
return PersistentLoggingPlugin(plugin: loggingPlugin)

Amplify/DevMenu/AmplifyDevMenu.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0
66
//
77

8-
#if os(iOS) && !os(xrOS)
8+
#if os(iOS) && !os(visionOS)
99
import Foundation
1010
import SwiftUI
1111
import UIKit

Amplify/DevMenu/Data/DevMenuItem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0
66
//
77

8-
#if os(iOS)
8+
#if os(iOS) || os(visionOS)
99
import Foundation
1010

1111
/// Data class for a row shown in the Developer Menu

Amplify/DevMenu/Data/DevMenuItemType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0
66
//
77

8-
#if os(iOS)
8+
#if os(iOS) || os(visionOS)
99
import Foundation
1010

1111
/// Item types for each row in the Developer Menu

Amplify/DevMenu/Data/DeviceInfoHelper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0
66
//
77

8-
#if os(iOS)
8+
#if os(iOS) || os(visionOS)
99
import Foundation
1010
import UIKit
1111

0 commit comments

Comments
 (0)