Skip to content

Commit e504eeb

Browse files
committed
removed WEB_AUTH_PLATFORM compilation check in sample app
1 parent 562b50e commit e504eeb

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

App/ContentView.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ struct ContentView: View {
2323

2424
Button {
2525
Task {
26-
#if WEB_AUTH_PLATFORM
2726
#if os(macOS)
2827
await viewModel.webLogin(presentationWindow: currentWindow)
2928
#else
3029
await viewModel.webLogin(presentationWindow: window)
3130
#endif
32-
#endif
3331
}
3432
} label: {
3533
VStack(spacing: 4) {
@@ -44,13 +42,11 @@ struct ContentView: View {
4442

4543
Button {
4644
Task {
47-
#if WEB_AUTH_PLATFORM
4845
#if os(macOS)
4946
await viewModel.logout(presentationWindow: currentWindow)
5047
#else
5148
await viewModel.logout(presentationWindow: window)
5249
#endif
53-
#endif
5450
}
5551
} label: {
5652
Text("Logout")

App/ContentViewModel.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ final class ContentViewModel: ObservableObject {
99
@Published var isAuthenticated: Bool = false
1010
private let credentialsManager = CredentialsManager(authentication: Auth0.authentication())
1111

12-
#if WEB_AUTH_PLATFORM
1312
func webLogin(presentationWindow window: Auth0WindowRepresentable? = nil) async {
1413
isLoading = true
1514
errorMessage = nil
@@ -60,9 +59,7 @@ final class ContentViewModel: ObservableObject {
6059

6160
isLoading = false
6261
}
63-
64-
#endif
65-
62+
6663
func checkAuthentication() async {
6764
do {
6865
let credentials = try await credentialsManager.credentials()

Auth0.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3983,7 +3983,7 @@
39833983
PRODUCT_NAME = "$(TARGET_NAME)";
39843984
PROVISIONING_PROFILE = "";
39853985
PROVISIONING_PROFILE_SPECIFIER = "";
3986-
SWIFT_ACTIVE_COMPILATION_CONDITIONS = WEB_AUTH_PLATFORM;
3986+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
39873987
SWIFT_VERSION = 5.0;
39883988
};
39893989
name = Debug;
@@ -4008,7 +4008,7 @@
40084008
PRODUCT_BUNDLE_IDENTIFIER = com.auth0.OAuth2;
40094009
PRODUCT_NAME = "$(TARGET_NAME)";
40104010
PROVISIONING_PROFILE_SPECIFIER = "";
4011-
SWIFT_ACTIVE_COMPILATION_CONDITIONS = WEB_AUTH_PLATFORM;
4011+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
40124012
SWIFT_VERSION = 5.0;
40134013
};
40144014
name = Release;
@@ -4049,7 +4049,7 @@
40494049
PRODUCT_NAME = "$(TARGET_NAME)";
40504050
SDKROOT = xros;
40514051
SUPPORTED_PLATFORMS = "xros xrsimulator";
4052-
SWIFT_ACTIVE_COMPILATION_CONDITIONS = WEB_AUTH_PLATFORM;
4052+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
40534053
SWIFT_EMIT_LOC_STRINGS = NO;
40544054
SWIFT_VERSION = 5.0;
40554055
TARGETED_DEVICE_FAMILY = "1,2,7";

0 commit comments

Comments
 (0)