Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force to recaptcha verification flow for phone auth in Simulators #10426

Merged
merged 9 commits into from
Nov 4, 2022
Prev Previous commit
Next Next commit
Update FIRPhoneAuthProvider.m
  • Loading branch information
Bkie Fsc committed Nov 1, 2022
commit 022313e143b84915ca8017f3220b64cfe8e1da81
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,14 @@ - (void)verifyClientAndSendVerificationCodeToPhoneNumber:(NSString *)phoneNumber
- (void)verifyClientWithUIDelegate:(nullable id<FIRAuthUIDelegate>)UIDelegate
completion:(FIRVerifyClientCallback)completion {
// Remove the simulator check below after FCM supports APNs in simulators
renkelvin marked this conversation as resolved.
Show resolved Hide resolved
#if TESTING
if (@available(iOS 17, *)) {
renkelvin marked this conversation as resolved.
Show resolved Hide resolved
if ([GULAppEnvironmentUtil isSimulator]) {
renkelvin marked this conversation as resolved.
Show resolved Hide resolved
[self reCAPTCHAFlowWithUIDelegate:UIDelegate completion:completion];
return;
NSDictionary *environment = [[NSProcessInfo processInfo] environment];
if ((environment[@"XCTestConfigurationFilePath"] == nil)) {
[self reCAPTCHAFlowWithUIDelegate:UIDelegate completion:completion];
return;
}
}
}
if (_auth.appCredentialManager.credential) {
Expand Down