Skip to content

Commit 4b9350d

Browse files
committed
fix build issues
1 parent 18ef7bf commit 4b9350d

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/SignedInData+Mock.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ extension SignedInData {
3030

3131
static var hostedUISignInData: SignedInData {
3232
let tokens = AWSCognitoUserPoolTokens.testData
33+
#if os(iOS) || os(macOS) || os(visionOS)
3334
return SignedInData(
3435
signedInDate: Date(),
3536
signInMethod: .hostedUI(.init(
@@ -45,5 +46,21 @@ extension SignedInData {
4546
)),
4647
cognitoUserPoolTokens: tokens
4748
)
49+
#else
50+
return SignedInData(
51+
signedInDate: Date(),
52+
signInMethod: .hostedUI(.init(
53+
scopes: [],
54+
providerInfo: .init(authProvider: .google, idpIdentifier: ""),
55+
presentationAnchor: nil,
56+
preferPrivateSession: false,
57+
nonce: nil,
58+
language: nil,
59+
loginHint: nil,
60+
resource: nil
61+
)),
62+
cognitoUserPoolTokens: tokens
63+
)
64+
#endif
4865
}
4966
}

AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/HostedUIRequestHelperTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Amplify
1111
import XCTest
1212
@testable import AWSCognitoAuthPlugin
1313

14+
#if os(iOS) || os(macOS) || os(visionOS)
1415
class HostedUIRequestHelperTests: XCTestCase {
1516
private var configuration: HostedUIConfigurationData!
1617
private let result = HostedUIResult(
@@ -124,3 +125,4 @@ class HostedUIRequestHelperTests: XCTestCase {
124125
XCTAssertEqual("http://localhost", urlComponents.queryItems?.first(where: { $0.name == "resource"})?.value)
125126
}
126127
}
128+
#endif

0 commit comments

Comments
 (0)