1
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// 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.
5
5
// See also: https://pub.dev/packages/pigeon
6
6
7
7
#import " messages.g.h"
8
+
9
+ #if TARGET_OS_OSX
10
+ #import < FlutterMacOS/FlutterMacOS.h>
11
+ #else
8
12
#import < Flutter/Flutter.h>
13
+ #endif
9
14
10
15
#if !__has_feature(objc_arc)
11
16
#error File requires ARC to be enabled.
12
17
#endif
13
18
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
+
14
41
static NSArray *wrapResult (id result, FlutterError *error) {
15
42
if (error) {
16
43
return @[
@@ -67,15 +94,10 @@ + (instancetype)makeWithReason:(NSString *)reason
67
94
+ (FLAAuthStrings *)fromList : (NSArray *)list {
68
95
FLAAuthStrings *pigeonResult = [[FLAAuthStrings alloc ] init ];
69
96
pigeonResult.reason = GetNullableObjectAtIndex (list, 0 );
70
- NSAssert (pigeonResult.reason != nil , @" " );
71
97
pigeonResult.lockOut = GetNullableObjectAtIndex (list, 1 );
72
- NSAssert (pigeonResult.lockOut != nil , @" " );
73
98
pigeonResult.goToSettingsButton = GetNullableObjectAtIndex (list, 2 );
74
- NSAssert (pigeonResult.goToSettingsButton != nil , @" " );
75
99
pigeonResult.goToSettingsDescription = GetNullableObjectAtIndex (list, 3 );
76
- NSAssert (pigeonResult.goToSettingsDescription != nil , @" " );
77
100
pigeonResult.cancelButton = GetNullableObjectAtIndex (list, 4 );
78
- NSAssert (pigeonResult.cancelButton != nil , @" " );
79
101
pigeonResult.localizedFallbackTitle = GetNullableObjectAtIndex (list, 5 );
80
102
return pigeonResult;
81
103
}
@@ -84,20 +106,20 @@ + (nullable FLAAuthStrings *)nullableFromList:(NSArray *)list {
84
106
}
85
107
- (NSArray *)toList {
86
108
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 ],
93
115
];
94
116
}
95
117
@end
96
118
97
119
@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 {
101
123
FLAAuthOptions *pigeonResult = [[FLAAuthOptions alloc ] init ];
102
124
pigeonResult.biometricOnly = biometricOnly;
103
125
pigeonResult.sticky = sticky;
@@ -106,22 +128,19 @@ + (instancetype)makeWithBiometricOnly:(NSNumber *)biometricOnly
106
128
}
107
129
+ (FLAAuthOptions *)fromList : (NSArray *)list {
108
130
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 ];
115
134
return pigeonResult;
116
135
}
117
136
+ (nullable FLAAuthOptions *)nullableFromList : (NSArray *)list {
118
137
return (list) ? [FLAAuthOptions fromList: list] : nil ;
119
138
}
120
139
- (NSArray *)toList {
121
140
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),
125
144
];
126
145
}
127
146
@end
@@ -149,8 +168,8 @@ + (nullable FLAAuthResultDetails *)nullableFromList:(NSArray *)list {
149
168
- (NSArray *)toList {
150
169
return @[
151
170
@(self .result),
152
- ( self .errorMessage ?: [NSNull null ]) ,
153
- ( self .errorDetails ?: [NSNull null ]) ,
171
+ self .errorMessage ?: [NSNull null ],
172
+ self .errorDetails ?: [NSNull null ],
154
173
];
155
174
}
156
175
@end
@@ -239,12 +258,12 @@ - (FlutterStandardReader *)readerWithData:(NSData *)data {
239
258
return sSharedObject ;
240
259
}
241
260
242
- void FLALocalAuthApiSetup (id <FlutterBinaryMessenger> binaryMessenger,
261
+ void SetUpFLALocalAuthApi (id <FlutterBinaryMessenger> binaryMessenger,
243
262
NSObject <FLALocalAuthApi> *api) {
244
263
// / Returns true if this device supports authentication.
245
264
{
246
265
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc ]
247
- initWithName: @" dev.flutter.pigeon.LocalAuthApi.isDeviceSupported"
266
+ initWithName: @" dev.flutter.pigeon.local_auth_ios. LocalAuthApi.isDeviceSupported"
248
267
binaryMessenger: binaryMessenger
249
268
codec: FLALocalAuthApiGetCodec ()];
250
269
if (api) {
@@ -265,7 +284,7 @@ void FLALocalAuthApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
265
284
// / any biometrics are enrolled or not.
266
285
{
267
286
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc ]
268
- initWithName: @" dev.flutter.pigeon.LocalAuthApi.deviceCanSupportBiometrics"
287
+ initWithName: @" dev.flutter.pigeon.local_auth_ios. LocalAuthApi.deviceCanSupportBiometrics"
269
288
binaryMessenger: binaryMessenger
270
289
codec: FLALocalAuthApiGetCodec ()];
271
290
if (api) {
@@ -286,7 +305,7 @@ void FLALocalAuthApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
286
305
// / without additional setup.
287
306
{
288
307
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc ]
289
- initWithName: @" dev.flutter.pigeon.LocalAuthApi.getEnrolledBiometrics"
308
+ initWithName: @" dev.flutter.pigeon.local_auth_ios. LocalAuthApi.getEnrolledBiometrics"
290
309
binaryMessenger: binaryMessenger
291
310
codec: FLALocalAuthApiGetCodec ()];
292
311
if (api) {
@@ -307,7 +326,7 @@ void FLALocalAuthApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
307
326
// / [strings] for any UI.
308
327
{
309
328
FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc ]
310
- initWithName: @" dev.flutter.pigeon.LocalAuthApi.authenticate"
329
+ initWithName: @" dev.flutter.pigeon.local_auth_ios. LocalAuthApi.authenticate"
311
330
binaryMessenger: binaryMessenger
312
331
codec: FLALocalAuthApiGetCodec ()];
313
332
if (api) {
0 commit comments