11// Copyright 2013 The Flutter Authors. All rights reserved.
22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
4- // Autogenerated from Pigeon (v9.2.5 ), do not edit directly.
4+ // Autogenerated from Pigeon (v13.0.0 ), do not edit directly.
55// See also: https://pub.dev/packages/pigeon
66
77#import " messages.g.h"
8+
9+ #if TARGET_OS_OSX
10+ #import < FlutterMacOS/FlutterMacOS.h>
11+ #else
812#import < Flutter/Flutter.h>
13+ #endif
914
1015#if !__has_feature(objc_arc)
1116#error File requires ARC to be enabled.
1217#endif
1318
19+ // / Possible outcomes of an authentication attempt.
20+ @implementation FLAAuthResultBox
21+ - (instancetype )initWithValue : (FLAAuthResult)value {
22+ self = [super init ];
23+ if (self) {
24+ _value = value;
25+ }
26+ return self;
27+ }
28+ @end
29+
30+ // / Pigeon equivalent of the subset of BiometricType used by iOS.
31+ @implementation FLAAuthBiometricBox
32+ - (instancetype )initWithValue : (FLAAuthBiometric)value {
33+ self = [super init ];
34+ if (self) {
35+ _value = value;
36+ }
37+ return self;
38+ }
39+ @end
40+
1441static NSArray *wrapResult (id result, FlutterError *error) {
1542 if (error) {
1643 return @[
@@ -67,15 +94,10 @@ + (instancetype)makeWithReason:(NSString *)reason
6794+ (FLAAuthStrings *)fromList : (NSArray *)list {
6895 FLAAuthStrings *pigeonResult = [[FLAAuthStrings alloc ] init ];
6996 pigeonResult.reason = GetNullableObjectAtIndex (list, 0 );
70- NSAssert (pigeonResult.reason != nil , @" " );
7197 pigeonResult.lockOut = GetNullableObjectAtIndex (list, 1 );
72- NSAssert (pigeonResult.lockOut != nil , @" " );
7398 pigeonResult.goToSettingsButton = GetNullableObjectAtIndex (list, 2 );
74- NSAssert (pigeonResult.goToSettingsButton != nil , @" " );
7599 pigeonResult.goToSettingsDescription = GetNullableObjectAtIndex (list, 3 );
76- NSAssert (pigeonResult.goToSettingsDescription != nil , @" " );
77100 pigeonResult.cancelButton = GetNullableObjectAtIndex (list, 4 );
78- NSAssert (pigeonResult.cancelButton != nil , @" " );
79101 pigeonResult.localizedFallbackTitle = GetNullableObjectAtIndex (list, 5 );
80102 return pigeonResult;
81103}
@@ -84,20 +106,20 @@ + (nullable FLAAuthStrings *)nullableFromList:(NSArray *)list {
84106}
85107- (NSArray *)toList {
86108 return @[
87- ( self .reason ?: [NSNull null ]) ,
88- ( self .lockOut ?: [NSNull null ]) ,
89- ( self .goToSettingsButton ?: [NSNull null ]) ,
90- ( self .goToSettingsDescription ?: [NSNull null ]) ,
91- ( self .cancelButton ?: [NSNull null ]) ,
92- ( self .localizedFallbackTitle ?: [NSNull null ]) ,
109+ self .reason ?: [NSNull null ],
110+ self .lockOut ?: [NSNull null ],
111+ self .goToSettingsButton ?: [NSNull null ],
112+ self .goToSettingsDescription ?: [NSNull null ],
113+ self .cancelButton ?: [NSNull null ],
114+ self .localizedFallbackTitle ?: [NSNull null ],
93115 ];
94116}
95117@end
96118
97119@implementation FLAAuthOptions
98- + (instancetype )makeWithBiometricOnly : (NSNumber * )biometricOnly
99- sticky : (NSNumber * )sticky
100- useErrorDialogs : (NSNumber * )useErrorDialogs {
120+ + (instancetype )makeWithBiometricOnly : (BOOL )biometricOnly
121+ sticky : (BOOL )sticky
122+ useErrorDialogs : (BOOL )useErrorDialogs {
101123 FLAAuthOptions *pigeonResult = [[FLAAuthOptions alloc ] init ];
102124 pigeonResult.biometricOnly = biometricOnly;
103125 pigeonResult.sticky = sticky;
@@ -106,22 +128,19 @@ + (instancetype)makeWithBiometricOnly:(NSNumber *)biometricOnly
106128}
107129+ (FLAAuthOptions *)fromList : (NSArray *)list {
108130 FLAAuthOptions *pigeonResult = [[FLAAuthOptions alloc ] init ];
109- pigeonResult.biometricOnly = GetNullableObjectAtIndex (list, 0 );
110- NSAssert (pigeonResult.biometricOnly != nil , @" " );
111- pigeonResult.sticky = GetNullableObjectAtIndex (list, 1 );
112- NSAssert (pigeonResult.sticky != nil , @" " );
113- pigeonResult.useErrorDialogs = GetNullableObjectAtIndex (list, 2 );
114- NSAssert (pigeonResult.useErrorDialogs != nil , @" " );
131+ pigeonResult.biometricOnly = [GetNullableObjectAtIndex (list, 0 ) boolValue ];
132+ pigeonResult.sticky = [GetNullableObjectAtIndex (list, 1 ) boolValue ];
133+ pigeonResult.useErrorDialogs = [GetNullableObjectAtIndex (list, 2 ) boolValue ];
115134 return pigeonResult;
116135}
117136+ (nullable FLAAuthOptions *)nullableFromList : (NSArray *)list {
118137 return (list) ? [FLAAuthOptions fromList: list] : nil ;
119138}
120139- (NSArray *)toList {
121140 return @[
122- (self .biometricOnly ?: [ NSNull null ] ),
123- (self .sticky ?: [ NSNull null ] ),
124- (self .useErrorDialogs ?: [ NSNull null ] ),
141+ @ (self .biometricOnly),
142+ @ (self .sticky),
143+ @ (self .useErrorDialogs),
125144 ];
126145}
127146@end
@@ -149,8 +168,8 @@ + (nullable FLAAuthResultDetails *)nullableFromList:(NSArray *)list {
149168- (NSArray *)toList {
150169 return @[
151170 @(self .result),
152- ( self .errorMessage ?: [NSNull null ]) ,
153- ( self .errorDetails ?: [NSNull null ]) ,
171+ self .errorMessage ?: [NSNull null ],
172+ self .errorDetails ?: [NSNull null ],
154173 ];
155174}
156175@end
@@ -239,12 +258,12 @@ - (FlutterStandardReader *)readerWithData:(NSData *)data {
239258 return sSharedObject ;
240259}
241260
242- void FLALocalAuthApiSetup (id <FlutterBinaryMessenger> binaryMessenger,
261+ void SetUpFLALocalAuthApi (id <FlutterBinaryMessenger> binaryMessenger,
243262 NSObject <FLALocalAuthApi> *api) {
244263 // / Returns true if this device supports authentication.
245264 {
246265 FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc ]
247- initWithName: @" dev.flutter.pigeon.LocalAuthApi.isDeviceSupported"
266+ initWithName: @" dev.flutter.pigeon.local_auth_ios. LocalAuthApi.isDeviceSupported"
248267 binaryMessenger: binaryMessenger
249268 codec: FLALocalAuthApiGetCodec ()];
250269 if (api) {
@@ -265,7 +284,7 @@ void FLALocalAuthApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
265284 // / any biometrics are enrolled or not.
266285 {
267286 FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc ]
268- initWithName: @" dev.flutter.pigeon.LocalAuthApi.deviceCanSupportBiometrics"
287+ initWithName: @" dev.flutter.pigeon.local_auth_ios. LocalAuthApi.deviceCanSupportBiometrics"
269288 binaryMessenger: binaryMessenger
270289 codec: FLALocalAuthApiGetCodec ()];
271290 if (api) {
@@ -286,7 +305,7 @@ void FLALocalAuthApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
286305 // / without additional setup.
287306 {
288307 FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc ]
289- initWithName: @" dev.flutter.pigeon.LocalAuthApi.getEnrolledBiometrics"
308+ initWithName: @" dev.flutter.pigeon.local_auth_ios. LocalAuthApi.getEnrolledBiometrics"
290309 binaryMessenger: binaryMessenger
291310 codec: FLALocalAuthApiGetCodec ()];
292311 if (api) {
@@ -307,7 +326,7 @@ void FLALocalAuthApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
307326 // / [strings] for any UI.
308327 {
309328 FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc ]
310- initWithName: @" dev.flutter.pigeon.LocalAuthApi.authenticate"
329+ initWithName: @" dev.flutter.pigeon.local_auth_ios. LocalAuthApi.authenticate"
311330 binaryMessenger: binaryMessenger
312331 codec: FLALocalAuthApiGetCodec ()];
313332 if (api) {
0 commit comments