diff --git a/src/frameworks.sources b/src/frameworks.sources index d1f3c6e30497..9c5b2727cdd0 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -1975,6 +1975,7 @@ MAC_FRAMEWORKS = \ JavaScriptCore \ LinkPresentation \ LocalAuthentication \ + LocalAuthenticationEmbeddedUI \ MailKit \ MapKit \ MediaAccessibility \ diff --git a/src/localauthenticationembeddedui.cs b/src/localauthenticationembeddedui.cs new file mode 100644 index 000000000000..d1d4de1a4ca3 --- /dev/null +++ b/src/localauthenticationembeddedui.cs @@ -0,0 +1,38 @@ +// +// LocalAuthenticationEmbeddedUI C# bindings +// +// Authors: +// Rachel Kang +// +// Copyright 2021 Microsoft Corporation All rights reserved. +// + +using System; +using ObjCRuntime; +using Foundation; +using AppKit; +using CoreGraphics; +using LocalAuthentication; + +namespace LocalAuthenticationEmbeddedUI { + + [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (12,0)] + [BaseType (typeof (NSView))] + interface LAAuthenticationView + { + [Export ("initWithFrame:")] + IntPtr Constructor (CGRect frameRect); + + [Export ("initWithContext:")] + IntPtr Constructor (LAContext context); + + [Export ("initWithContext:controlSize:")] + IntPtr Constructor (LAContext context, NSControlSize controlSize); + + [Export ("context")] + LAContext Context { get; } + + [Export ("controlSize")] + NSControlSize ControlSize { get; } + } +} diff --git a/tests/xtro-sharpie/MacCatalyst-LocalAuthenticationEmbeddedUI.todo b/tests/xtro-sharpie/MacCatalyst-LocalAuthenticationEmbeddedUI.ignore similarity index 87% rename from tests/xtro-sharpie/MacCatalyst-LocalAuthenticationEmbeddedUI.todo rename to tests/xtro-sharpie/MacCatalyst-LocalAuthenticationEmbeddedUI.ignore index c1acdf86f235..5bf4f95d80dc 100644 --- a/tests/xtro-sharpie/MacCatalyst-LocalAuthenticationEmbeddedUI.todo +++ b/tests/xtro-sharpie/MacCatalyst-LocalAuthenticationEmbeddedUI.ignore @@ -1,3 +1,4 @@ +## No LocalAuthentication support for Catalyst !missing-selector! LAAuthenticationView::context not bound !missing-selector! LAAuthenticationView::controlSize not bound !missing-selector! LAAuthenticationView::initWithContext: not bound diff --git a/tests/xtro-sharpie/macOS-LocalAuthenticationEmbeddedUI.todo b/tests/xtro-sharpie/macOS-LocalAuthenticationEmbeddedUI.todo deleted file mode 100644 index c1acdf86f235..000000000000 --- a/tests/xtro-sharpie/macOS-LocalAuthenticationEmbeddedUI.todo +++ /dev/null @@ -1,5 +0,0 @@ -!missing-selector! LAAuthenticationView::context not bound -!missing-selector! LAAuthenticationView::controlSize not bound -!missing-selector! LAAuthenticationView::initWithContext: not bound -!missing-selector! LAAuthenticationView::initWithContext:controlSize: not bound -!missing-type! LAAuthenticationView not bound diff --git a/tools/common/Frameworks.cs b/tools/common/Frameworks.cs index 9fce5c10f3fc..21470bbdca49 100644 --- a/tools/common/Frameworks.cs +++ b/tools/common/Frameworks.cs @@ -262,6 +262,7 @@ public static Frameworks MacFrameworks { { "AdServices", "AdServices", 11,1 }, { "Chip", "CHIP", 12, 0 }, + { "LocalAuthenticationEmbeddedUI", "LocalAuthenticationEmbeddedUI", 12, 0 }, { "MailKit", "MailKit", 12, 0 }, { "MetricKit", 12, 0 }, { "Phase", "PHASE", 12, 0 },