Bug 22900 - No C# version of LAError enum
Summary: No C# version of LAError enum
Status: RESOLVED INVALID
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 8.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-09-11 22:36 UTC by Kevin Chen
Modified: 2014-09-12 00:15 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Kevin Chen 2014-09-11 22:36:33 UTC
iOS 8 added Local Authentication. The error codes for this API are in an enum called LAError, but this enum is not available in Xamarin.iOS 8.0.0.9, which is the most recent build on the Beta channel. 

So I have this in my code:

    // Based on LAPublicDefines.h from iOS 8 SDK GM
    public enum LAError : int
    {
        AuthenticationFailed = -1,
        UserCancel           = -2,
        UserFallback         = -3,
        SystemCancel         = -4,
        PasscodeNotSet       = -5,
        TouchIDNotAvailable  = -6,
        TouchIDNotEnrolled   = -7,
    }

More info: https://developer.apple.com/library/prerelease/ios/documentation/LocalAuthentication/Reference/LAContext_Class/index.html#//apple_ref/c/tdef/LAError
Comment 1 Sebastien Pouliot 2014-09-12 00:08:36 UTC
It's available and called `LAStatus`, maybe the enum name was changed during the previews ?
Comment 2 Sebastien Pouliot 2014-09-12 00:10:50 UTC
Looks like it might have been intentional... c.c. Miguel

commit 03d30c9df07914fd155b2863f105a1542d129e73
Author: Miguel de Icaza <miguel@gnome.org>
Date:   Mon Jun 16 09:41:53 2014 -0400

    [ios8/LocalAuthentication] Fix error code names + remove redundant ArgumentSemantic.Copy from string properties

diff --git a/src/LocalAuthentication/LAEnums.cs b/src/LocalAuthentication/LAEnums.cs
index 2e72837..331d646 100644
--- a/src/LocalAuthentication/LAEnums.cs
+++ b/src/LocalAuthentication/LAEnums.cs
@@ -22,20 +22,21 @@ namespace XamCore.LocalAuthentication {
        [Since (8,0)]
        [Availability (Platform.Mac_10_10)]
        [Native]
-       public enum LAError : nint {
+       public enum LAStatus : nint {
Comment 3 Kevin Chen 2014-09-12 00:15:37 UTC
Oh wow, I'm an idiot. I thought I looked through the autocomplete for LA* but I guess not. Sorry about that.