Skip to content
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions FirebaseAuth/Sources/AuthProvider/Phone/FIRPhoneAuthProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
* limitations under the License.
*/

#import <GoogleUtilities/GULAppEnvironmentUtil.h>
#import <TargetConditionals.h>

#if TARGET_OS_IOS

#import "FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthSettings.h"
Expand Down Expand Up @@ -593,6 +595,16 @@ - (void)verifyClientAndSendVerificationCodeToPhoneNumber:(NSString *)phoneNumber
*/
- (void)verifyClientWithUIDelegate:(nullable id<FIRAuthUIDelegate>)UIDelegate
completion:(FIRVerifyClientCallback)completion {
// Remove the simulator check below after FCM supports APNs in simulators
if (@available(iOS 17, *)) {
if ([GULAppEnvironmentUtil isSimulator]) {
NSDictionary *environment = [[NSProcessInfo processInfo] environment];
if ((environment[@"XCTestConfigurationFilePath"] == nil)) {
[self reCAPTCHAFlowWithUIDelegate:UIDelegate completion:completion];
return;
}
}
}
if (_auth.appCredentialManager.credential) {
completion(_auth.appCredentialManager.credential, nil, nil);
return;
Expand Down