Skip to content

Commit 328c5cf

Browse files
authored
Fix build regression (#1197)
* Fix build regression * phoneauthui spm build issues * test build fix
1 parent 97da8e6 commit 328c5cf

File tree

8 files changed

+13
-11
lines changed

8 files changed

+13
-11
lines changed

FirebaseAuthUI.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'FirebaseAuthUI'
3-
s.version = '14.2.0'
3+
s.version = '14.2.1'
44
s.summary = 'A prebuilt authentication UI flow for Firebase Auth.'
55
s.homepage = 'https://github.com/firebase/FirebaseUI-iOS'
66
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }

FirebaseAuthUI/FirebaseAuthUITests/FUIAuthTest.m

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
//
1616

1717
@import XCTest;
18+
@import FirebaseAuth;
1819
@import FirebaseCore;
1920

2021
#import "FUIAuth.h"

FirebaseAuthUI/Sources/Public/FirebaseAuthUI/FUIAuth.h

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#import "FUIAuthProvider.h"
2121

2222
@class FIRAuth;
23+
@class FIRAuthDataResult;
2324
@class FUIAuthPickerViewController;
2425
@class FUIAuth;
2526
@class FIRUser;

FirebaseAuthUI/Sources/Public/FirebaseAuthUI/FUIAuthProvider.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
//
1616

1717
#import <UIKit/UIKit.h>
18-
@import FirebaseAuth;
1918

2019
@class FIRAuth;
2120
@class FIRAuthCredential;
21+
@class FIRUser;
2222
@class FIRUserInfo;
2323

2424
typedef void (^FIRAuthResultCallback)(FIRUser *_Nullable user, NSError *_Nullable error);

FirebasePhoneAuthUI.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'FirebasePhoneAuthUI'
3-
s.version = '14.2.0'
3+
s.version = '14.2.1'
44
s.summary = 'A phone auth provider for FirebaseAuthUI.'
55
s.homepage = 'https://github.com/firebase/FirebaseUI-iOS'
66
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }

FirebasePhoneAuthUI/Sources/FUIPhoneAuth.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ - (instancetype)initWithAuthUI:(FUIAuth *)authUI
8383
#pragma mark - FUIAuthProvider
8484

8585
- (nullable NSString *)providerID {
86-
return FIRPhoneAuthProviderID;
86+
return @"phone";
8787
}
8888

8989
/** @fn accessToken:
@@ -147,11 +147,11 @@ - (void)signInWithDefaultValue:(nullable NSString *)defaultValue
147147
completion:(nullable FUIAuthProviderSignInCompletionBlock)completion {
148148
_pendingSignInCallback = completion;
149149

150-
FUIPhoneAuth *delegate = [_authUI providerWithID:FIRPhoneAuthProviderID];
150+
FUIPhoneAuth *delegate = [_authUI providerWithID:@"phone"];
151151
if (!delegate) {
152152
NSError *error = [FUIAuthErrorUtils errorWithCode:FUIAuthErrorCodeCantFindProvider
153153
userInfo:@{
154-
FUIAuthErrorUserInfoProviderIDKey : FIRPhoneAuthProviderID
154+
FUIAuthErrorUserInfoProviderIDKey : @"phone"
155155
}];
156156
[self callbackWithCredential:nil error:error result:^(FIRUser *_Nullable user,
157157
NSError *_Nullable error) {

FirebasePhoneAuthUI/Sources/FUIPhoneEntryViewController.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ - (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil
112112
if (self) {
113113
self.title = FUIPhoneAuthLocalizedString(kPAStr_EnterPhoneTitle);
114114
_countryCodes = countryCodes ?: [[FUICountryCodes alloc] init];
115-
FUIPhoneAuth *provider = [authUI providerWithID:FIRPhoneAuthProviderID];
115+
FUIPhoneAuth *provider = [authUI providerWithID:@"phone"];
116116
NSString *defaultCountryCode = provider.defaultCountryCode;
117117
_countryCodes.defaultCountryCodeInfo =
118118
[_countryCodes countryCodeInfoForCode:defaultCountryCode];
@@ -221,7 +221,7 @@ - (void)onNext:(NSString *)phoneNumber {
221221
actionHandler:nil];
222222
[self presentViewController:alertController animated:YES completion:nil];
223223

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

361361
- (void)cancelAuthorization {
362362
NSError *error = [FUIAuthErrorUtils userCancelledSignInError];
363-
FUIPhoneAuth *delegate = [self.authUI providerWithID:FIRPhoneAuthProviderID];
363+
FUIPhoneAuth *delegate = [self.authUI providerWithID:@"phone"];
364364
[delegate callbackWithCredential:nil error:error result:^(FIRUser *_Nullable user,
365365
NSError *_Nullable error) {
366366
if (!error || error.code == FUIAuthErrorCodeUserCancelledSignIn) {

FirebasePhoneAuthUI/Sources/FUIPhoneVerificationViewController.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ - (void)onNext:(NSString *)verificationCode {
185185
[self incrementActivity];
186186
[_codeField resignFirstResponder];
187187
self.navigationItem.rightBarButtonItem.enabled = NO;
188-
FUIPhoneAuth *delegate = [self.authUI providerWithID:FIRPhoneAuthProviderID];
188+
FUIPhoneAuth *delegate = [self.authUI providerWithID:@"phone"];
189189
[delegate callbackWithCredential:credential
190190
error:nil
191191
result:^(FIRUser *_Nullable user, NSError *_Nullable error) {
@@ -221,7 +221,7 @@ - (void)observeValueForKeyPath:(nullable NSString *)keyPath
221221

222222
- (void)cancelAuthorization {
223223
NSError *error = [FUIAuthErrorUtils userCancelledSignInError];
224-
FUIPhoneAuth *delegate = [self.authUI providerWithID:FIRPhoneAuthProviderID];
224+
FUIPhoneAuth *delegate = [self.authUI providerWithID:@"phone"];
225225
[delegate callbackWithCredential:nil
226226
error:error
227227
result:^(FIRUser *_Nullable user, NSError *_Nullable error) {

0 commit comments

Comments
 (0)