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

Fix build regression #1197

Merged
merged 3 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion FirebaseAuthUI.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FirebaseAuthUI'
s.version = '14.2.0'
s.version = '14.2.1'
s.summary = 'A prebuilt authentication UI flow for Firebase Auth.'
s.homepage = 'https://github.com/firebase/FirebaseUI-iOS'
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
Expand Down
1 change: 1 addition & 0 deletions FirebaseAuthUI/FirebaseAuthUITests/FUIAuthTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//

@import XCTest;
@import FirebaseAuth;
@import FirebaseCore;

#import "FUIAuth.h"
Expand Down
1 change: 1 addition & 0 deletions FirebaseAuthUI/Sources/Public/FirebaseAuthUI/FUIAuth.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#import "FUIAuthProvider.h"

@class FIRAuth;
@class FIRAuthDataResult;
@class FUIAuthPickerViewController;
@class FUIAuth;
@class FIRUser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
//

#import <UIKit/UIKit.h>
@import FirebaseAuth;

@class FIRAuth;
@class FIRAuthCredential;
@class FIRUser;
@class FIRUserInfo;

typedef void (^FIRAuthResultCallback)(FIRUser *_Nullable user, NSError *_Nullable error);
Expand Down
2 changes: 1 addition & 1 deletion FirebasePhoneAuthUI.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FirebasePhoneAuthUI'
s.version = '14.2.0'
s.version = '14.2.1'
s.summary = 'A phone auth provider for FirebaseAuthUI.'
s.homepage = 'https://github.com/firebase/FirebaseUI-iOS'
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
Expand Down
6 changes: 3 additions & 3 deletions FirebasePhoneAuthUI/Sources/FUIPhoneAuth.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ - (instancetype)initWithAuthUI:(FUIAuth *)authUI
#pragma mark - FUIAuthProvider

- (nullable NSString *)providerID {
return FIRPhoneAuthProviderID;
return @"phone";
}

/** @fn accessToken:
Expand Down Expand Up @@ -147,11 +147,11 @@ - (void)signInWithDefaultValue:(nullable NSString *)defaultValue
completion:(nullable FUIAuthProviderSignInCompletionBlock)completion {
_pendingSignInCallback = completion;

FUIPhoneAuth *delegate = [_authUI providerWithID:FIRPhoneAuthProviderID];
FUIPhoneAuth *delegate = [_authUI providerWithID:@"phone"];
if (!delegate) {
NSError *error = [FUIAuthErrorUtils errorWithCode:FUIAuthErrorCodeCantFindProvider
userInfo:@{
FUIAuthErrorUserInfoProviderIDKey : FIRPhoneAuthProviderID
FUIAuthErrorUserInfoProviderIDKey : @"phone"
}];
[self callbackWithCredential:nil error:error result:^(FIRUser *_Nullable user,
NSError *_Nullable error) {
Expand Down
6 changes: 3 additions & 3 deletions FirebasePhoneAuthUI/Sources/FUIPhoneEntryViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ - (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil
if (self) {
self.title = FUIPhoneAuthLocalizedString(kPAStr_EnterPhoneTitle);
_countryCodes = countryCodes ?: [[FUICountryCodes alloc] init];
FUIPhoneAuth *provider = [authUI providerWithID:FIRPhoneAuthProviderID];
FUIPhoneAuth *provider = [authUI providerWithID:@"phone"];
NSString *defaultCountryCode = provider.defaultCountryCode;
_countryCodes.defaultCountryCodeInfo =
[_countryCodes countryCodeInfoForCode:defaultCountryCode];
Expand Down Expand Up @@ -221,7 +221,7 @@ - (void)onNext:(NSString *)phoneNumber {
actionHandler:nil];
[self presentViewController:alertController animated:YES completion:nil];

FUIPhoneAuth *delegate = [self.authUI providerWithID:FIRPhoneAuthProviderID];
FUIPhoneAuth *delegate = [self.authUI providerWithID:@"phone"];
[delegate callbackWithCredential:nil error:error result:nil];
return;
}
Expand Down Expand Up @@ -360,7 +360,7 @@ - (void)setCountryCodeValue {

- (void)cancelAuthorization {
NSError *error = [FUIAuthErrorUtils userCancelledSignInError];
FUIPhoneAuth *delegate = [self.authUI providerWithID:FIRPhoneAuthProviderID];
FUIPhoneAuth *delegate = [self.authUI providerWithID:@"phone"];
[delegate callbackWithCredential:nil error:error result:^(FIRUser *_Nullable user,
NSError *_Nullable error) {
if (!error || error.code == FUIAuthErrorCodeUserCancelledSignIn) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ - (void)onNext:(NSString *)verificationCode {
[self incrementActivity];
[_codeField resignFirstResponder];
self.navigationItem.rightBarButtonItem.enabled = NO;
FUIPhoneAuth *delegate = [self.authUI providerWithID:FIRPhoneAuthProviderID];
FUIPhoneAuth *delegate = [self.authUI providerWithID:@"phone"];
[delegate callbackWithCredential:credential
error:nil
result:^(FIRUser *_Nullable user, NSError *_Nullable error) {
Expand Down Expand Up @@ -221,7 +221,7 @@ - (void)observeValueForKeyPath:(nullable NSString *)keyPath

- (void)cancelAuthorization {
NSError *error = [FUIAuthErrorUtils userCancelledSignInError];
FUIPhoneAuth *delegate = [self.authUI providerWithID:FIRPhoneAuthProviderID];
FUIPhoneAuth *delegate = [self.authUI providerWithID:@"phone"];
[delegate callbackWithCredential:nil
error:error
result:^(FIRUser *_Nullable user, NSError *_Nullable error) {
Expand Down