From 4dcbde08d67be94dec11b47b1586fd2d074783da Mon Sep 17 00:00:00 2001 From: redth Date: Fri, 19 May 2023 14:04:16 -0400 Subject: [PATCH] Enable MacCatalyst for the Apple Sign In Authenticator --- .../src/WebAuthenticator/AppleSignInAuthenticator.ios.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Essentials/src/WebAuthenticator/AppleSignInAuthenticator.ios.cs b/src/Essentials/src/WebAuthenticator/AppleSignInAuthenticator.ios.cs index 2a5269e288f8..460eacd9dc54 100644 --- a/src/Essentials/src/WebAuthenticator/AppleSignInAuthenticator.ios.cs +++ b/src/Essentials/src/WebAuthenticator/AppleSignInAuthenticator.ios.cs @@ -14,7 +14,10 @@ partial class AppleSignInAuthenticatorImplementation : IAppleSignInAuthenticator public async Task AuthenticateAsync(AppleSignInAuthenticator.Options options) { - if (!OperatingSystem.IsIOSVersionAtLeast(13)) + if (OperatingSystem.IsIOS() && !OperatingSystem.IsIOSVersionAtLeast(13)) + throw new FeatureNotSupportedException(); + + if (OperatingSystem.IsMacCatalyst() && !OperatingSystem.IsMacCatalystVersionAtLeast(13, 1)) throw new FeatureNotSupportedException(); var provider = new ASAuthorizationAppleIdProvider(); @@ -60,6 +63,7 @@ public async Task AuthenticateAsync(AppleSignInAuthentic } [System.Runtime.Versioning.SupportedOSPlatform("ios13.0")] + [System.Runtime.Versioning.SupportedOSPlatform("maccatalyst13.1")] class AuthManager : NSObject, IASAuthorizationControllerDelegate, IASAuthorizationControllerPresentationContextProviding { public Task GetCredentialsAsync()