Skip to content
Merged
Changes from 8 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
13 changes: 13 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,17 @@ - (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 TARGET_OS_SIMULATOR
if (@available(iOS 16, *)) {
NSDictionary *environment = [[NSProcessInfo processInfo] environment];
if ((environment[@"XCTestConfigurationFilePath"] == nil)) {
[self reCAPTCHAFlowWithUIDelegate:UIDelegate completion:completion];
return;
}
}
#endif

if (_auth.appCredentialManager.credential) {
completion(_auth.appCredentialManager.credential, nil, nil);
return;
Expand Down