@@ -101,7 +101,6 @@ @interface FLTFirebaseAuthPlugin ()
101
101
@end
102
102
103
103
@implementation FLTFirebaseAuthPlugin {
104
- #if TARGET_OS_IPHONE
105
104
// Map an id to a MultiFactorSession object.
106
105
NSMutableDictionary <NSString *, FIRMultiFactorSession *> *_multiFactorSessionMap;
107
106
@@ -114,8 +113,6 @@ @implementation FLTFirebaseAuthPlugin {
114
113
// Map an id to a MultiFactorResolver object.
115
114
NSMutableDictionary <NSString *, FIRTOTPSecret *> *_multiFactorTotpSecretMap;
116
115
117
- #endif
118
-
119
116
NSObject <FlutterBinaryMessenger> *_binaryMessenger;
120
117
NSMutableDictionary <NSString *, FlutterEventChannel *> *_eventChannels;
121
118
NSMutableDictionary <NSString *, NSObject <FlutterStreamHandler> *> *_streamHandlers;
@@ -133,13 +130,10 @@ - (instancetype)init:(NSObject<FlutterBinaryMessenger> *)messenger {
133
130
_eventChannels = [NSMutableDictionary dictionary ];
134
131
_streamHandlers = [NSMutableDictionary dictionary ];
135
132
136
- #if TARGET_OS_IPHONE
137
133
_multiFactorSessionMap = [NSMutableDictionary dictionary ];
138
134
_multiFactorResolverMap = [NSMutableDictionary dictionary ];
139
135
_multiFactorAssertionMap = [NSMutableDictionary dictionary ];
140
136
_multiFactorTotpSecretMap = [NSMutableDictionary dictionary ];
141
-
142
- #endif
143
137
}
144
138
return self;
145
139
}
@@ -164,11 +158,11 @@ + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
164
158
[registrar addApplicationDelegate: instance];
165
159
SetUpFirebaseAuthHostApi (registrar.messenger , instance);
166
160
SetUpFirebaseAuthUserHostApi (registrar.messenger , instance);
161
+ #endif
167
162
SetUpMultiFactorUserHostApi (registrar.messenger , instance);
168
163
SetUpMultiFactoResolverHostApi (registrar.messenger , instance);
169
164
SetUpMultiFactorTotpHostApi (registrar.messenger , instance);
170
165
SetUpMultiFactorTotpSecretHostApi (registrar.messenger , instance);
171
- #endif
172
166
}
173
167
174
168
+ (FlutterError *)convertToFlutterError : (NSError *)error {
@@ -841,13 +835,11 @@ - (void)ensureAPNSTokenSetting {
841
835
#endif
842
836
}
843
837
844
- #if !TARGET_OS_OSX
845
838
- (FIRMultiFactor *)getAppMultiFactorFromPigeon : (nonnull AuthPigeonFirebaseApp *)app {
846
839
FIRAuth *auth = [self getFIRAuthFromAppNameFromPigeon: app];
847
840
FIRUser *currentUser = auth.currentUser ;
848
841
return currentUser.multiFactor ;
849
842
}
850
- #endif
851
843
852
844
- (nonnull ASPresentationAnchor)presentationAnchorForAuthorizationController :
853
845
(nonnull ASAuthorizationController *)controller API_AVAILABLE(macos(10.15 ), ios(13.0 )) {
@@ -858,8 +850,6 @@ - (nonnull ASPresentationAnchor)presentationAnchorForAuthorizationController:
858
850
#endif
859
851
}
860
852
861
- #if TARGET_OS_IPHONE
862
-
863
853
- (void )enrollPhoneApp : (nonnull AuthPigeonFirebaseApp *)app
864
854
assertion : (nonnull PigeonPhoneMultiFactorAssertion *)assertion
865
855
displayName : (nullable NSString *)displayName
@@ -1071,8 +1061,6 @@ - (void)openInOtpAppSecretKey:(nonnull NSString *)secretKey
1071
1061
completion (nil );
1072
1062
}
1073
1063
1074
- #endif
1075
-
1076
1064
- (void )applyActionCodeApp : (nonnull AuthPigeonFirebaseApp *)app
1077
1065
code : (nonnull NSString *)code
1078
1066
completion : (nonnull void (^)(FlutterError *_Nullable))completion {
0 commit comments