Skip to content

Commit

Permalink
phoneauthui spm build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed Aug 13, 2024
1 parent 34ad739 commit f592a2e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
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

0 comments on commit f592a2e

Please sign in to comment.