@@ -850,12 +850,16 @@ - (nonnull ASPresentationAnchor)presentationAnchorForAuthorizationController:
850
850
#endif
851
851
}
852
852
853
- #if TARGET_OS_IPHONE
854
-
855
853
- (void )enrollPhoneApp : (nonnull AuthPigeonFirebaseApp *)app
856
854
assertion : (nonnull PigeonPhoneMultiFactorAssertion *)assertion
857
855
displayName : (nullable NSString *)displayName
858
856
completion : (nonnull void (^)(FlutterError *_Nullable))completion {
857
+ #if TARGET_OS_OSX
858
+ completion ([FlutterError errorWithCode: @" unsupported-platform"
859
+ message: @" Phone authentication is not supported on macOS"
860
+ details: nil ]);
861
+ #else
862
+
859
863
FIRMultiFactor *multiFactor = [self getAppMultiFactorFromPigeon: app];
860
864
861
865
FIRPhoneAuthCredential *credential =
@@ -877,9 +881,8 @@ - (void)enrollPhoneApp:(nonnull AuthPigeonFirebaseApp *)app
877
881
details: nil ]);
878
882
}
879
883
}];
880
- }
881
-
882
884
#endif
885
+ }
883
886
884
887
- (void )getEnrolledFactorsApp : (nonnull AuthPigeonFirebaseApp *)app
885
888
completion : (nonnull void (^)(NSArray <PigeonMultiFactorInfo *> *_Nullable,
@@ -959,13 +962,16 @@ - (void)enrollTotpApp:(nonnull AuthPigeonFirebaseApp *)app
959
962
}];
960
963
}
961
964
962
- #if TARGET_OS_IPHONE
963
-
964
965
- (void )resolveSignInResolverId : (nonnull NSString *)resolverId
965
966
assertion : (nullable PigeonPhoneMultiFactorAssertion *)assertion
966
967
totpAssertionId : (nullable NSString *)totpAssertionId
967
968
completion : (nonnull void (^)(PigeonUserCredential *_Nullable,
968
969
FlutterError *_Nullable))completion {
970
+ #if TARGET_OS_OSX
971
+ completion (nil , [FlutterError errorWithCode: @" unsupported-platform"
972
+ message: @" Phone authentication is not supported on macOS"
973
+ details: nil ]);
974
+ #else
969
975
FIRMultiFactorResolver *resolver = _multiFactorResolverMap[resolverId];
970
976
971
977
FIRMultiFactorAssertion *multiFactorAssertion;
@@ -999,9 +1005,8 @@ - (void)resolveSignInResolverId:(nonnull NSString *)resolverId
999
1005
details: nil ]);
1000
1006
}
1001
1007
}];
1002
- }
1003
-
1004
1008
#endif
1009
+ }
1005
1010
1006
1011
- (void )generateSecretSessionId : (nonnull NSString *)sessionId
1007
1012
completion : (nonnull void (^)(PigeonTotpSecret *_Nullable,
0 commit comments