Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Use Catalyst OIDExternalUserAgentCatalyst for visionOS
  • Loading branch information
paulb777 committed May 10, 2024
commit a24fa54a542e39147d404764dddec8bfd6060559
2 changes: 1 addition & 1 deletion Sources/AppAuth/iOS/OIDAuthState+IOS.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ @implementation OIDAuthState (IOS)
presentingViewController:(UIViewController *)presentingViewController
callback:(OIDAuthStateAuthorizationCallback)callback {
id<OIDExternalUserAgent> externalUserAgent;
#if TARGET_OS_MACCATALYST
#if TARGET_OS_MACCATALYST || TARGET_OS_VISION
externalUserAgent = [[OIDExternalUserAgentCatalyst alloc]
initWithPresentingViewController:presentingViewController];
#else // TARGET_OS_MACCATALYST
Expand Down
2 changes: 1 addition & 1 deletion Sources/AppAuth/iOS/OIDAuthorizationService+IOS.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ @implementation OIDAuthorizationService (IOS)
presentingViewController:(UIViewController *)presentingViewController
callback:(OIDAuthorizationCallback)callback {
id<OIDExternalUserAgent> externalUserAgent;
#if TARGET_OS_MACCATALYST
#if TARGET_OS_MACCATALYST || TARGET_OS_VISION
externalUserAgent = [[OIDExternalUserAgentCatalyst alloc]
initWithPresentingViewController:presentingViewController];
#else // TARGET_OS_MACCATALYST
Expand Down
2 changes: 1 addition & 1 deletion Sources/AppAuth/iOS/OIDExternalUserAgentCatalyst.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
/*! @brief A Catalyst specific external user-agent that uses `ASWebAuthenticationSession` to
present the request.
*/
API_AVAILABLE(macCatalyst(13)) API_UNAVAILABLE(ios)
API_AVAILABLE(macCatalyst(13), visionos(1)) API_UNAVAILABLE(ios)
@interface OIDExternalUserAgentCatalyst : NSObject<OIDExternalUserAgent>

/*! @internal
Expand Down
6 changes: 3 additions & 3 deletions Sources/AppAuth/iOS/OIDExternalUserAgentCatalyst.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#import "OIDExternalUserAgentSession.h"
#import "OIDExternalUserAgentRequest.h"

#if TARGET_OS_MACCATALYST
#if TARGET_OS_MACCATALYST || TARGET_OS_VISION

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -152,6 +152,6 @@ - (ASPresentationAnchor)presentationAnchorForWebAuthenticationSession:(ASWebAuth

NS_ASSUME_NONNULL_END

#endif // TARGET_OS_MACCATALYST
#endif // TARGET_OS_MACCATALYST || TARGET_OS_VISION

#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST
#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST || TARGET_OS_VISION