From d5e748d61b36327394624f4ceb19c9172937371e Mon Sep 17 00:00:00 2001 From: Zsika Phillip Date: Mon, 30 Apr 2018 18:25:06 -0700 Subject: Remove deprecated verify phone number (#1200) * remove_deprecated_verify_phone * Fixes unit tests --- .../AuthProviders/Phone/FIRPhoneAuthProvider.m | 14 ------------ Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h | 26 ---------------------- 2 files changed, 40 deletions(-) (limited to 'Firebase/Auth') diff --git a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m index 2d06a15..3532861 100644 --- a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m +++ b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m @@ -108,20 +108,6 @@ NSString *const kReCAPTCHAURLStringFormat = @"https://%@/__/auth/handler?"; return self; } -- (void)verifyPhoneNumber:(NSString *)phoneNumber - completion:(nullable FIRVerificationResultCallback)completion { - dispatch_async(FIRAuthGlobalWorkQueue(), ^{ - [self internalVerifyPhoneNumber:phoneNumber completion:^(NSString *_Nullable verificationID, - NSError *_Nullable error) { - if (completion) { - dispatch_async(dispatch_get_main_queue(), ^{ - completion(verificationID, error); - }); - } - }]; - }); -} - - (void)verifyPhoneNumber:(NSString *)phoneNumber UIDelegate:(nullable id)UIDelegate completion:(nullable FIRVerificationResultCallback)completion { diff --git a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h index bd68e84..28757f5 100644 --- a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h +++ b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h @@ -61,32 +61,6 @@ NS_SWIFT_NAME(PhoneAuthProvider) */ + (instancetype)providerWithAuth:(FIRAuth *)auth NS_SWIFT_NAME(provider(auth:)); -/** @fn verifyPhoneNumber:completion: - @brief Please use `verifyPhoneNumber:UIDelegate:completion:` instead. - - @param phoneNumber The phone number to be verified. - @param completion The callback to be invoked when the verification flow is finished. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeAppNotVerified` - Indicates that Firebase could not retrieve the - silent push notification and therefore could not verify your app. - + `FIRAuthErrorCodeInvalidAppCredential` - Indicates that The APNs device token provided - is either incorrect or does not match the private certificate uploaded to the Firebase - Console. - + `FIRAuthErrorCodeQuotaExceeded` - Indicates that the phone verification quota for this - project has been exceeded. - + `FIRAuthErrorCodeInvalidPhoneNumber` - Indicates that the phone number provided is - invalid. - + `FIRAuthErrorCodeMissingPhoneNumber` - Indicates that a phone number was not provided. - + `FIRAuthErrorCodeMissingAppToken` - Indicates that the APNs device token could not be - obtained. The app may not have set up remote notification correctly, or may fail to - forward the APNs device token to FIRAuth if app delegate swizzling is disabled. - */ -- (void)verifyPhoneNumber:(NSString *)phoneNumber - completion:(nullable FIRVerificationResultCallback)completion - __attribute__((deprecated)); - /** @fn verifyPhoneNumber:UIDelegate:completion: @brief Starts the phone number authentication flow by sending a verifcation code to the specified phone number. -- cgit v1.2.3