Skip to content

Commit 81d7c19

Browse files
Fix iOS issues after update
1 parent e81ac86 commit 81d7c19

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

plugin.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@
8989
<header-file src="src/ios/FirebaseUIAuthPlugin.h"/>
9090
<source-file src="src/ios/FirebaseUIAuthPlugin.m"/>
9191

92-
<framework src="FirebaseUI/Auth" type="podspec" spec="~> 5.0.1"/>
93-
<framework src="FirebaseUI/Google" type="podspec" spec="~> 5.0.1"/>
94-
<framework src="FirebaseUI/Facebook" type="podspec" spec="~> 5.0.1"/>
92+
<framework src="FirebaseUI/Auth" type="podspec" spec="~> 5.0.0"/>
93+
<framework src="FirebaseUI/Google" type="podspec" spec="~> 5.0.0"/>
94+
<framework src="FirebaseUI/Facebook" type="podspec" spec="~> 5.0.0"/>
9595
</platform>
9696

9797
<platform name="android">

src/ios/FirebaseUIAuthPlugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#import <Foundation/Foundation.h>
22
#import <Cordova/CDV.h>
33
@import Firebase;
4-
@import FirebaseAuthUI;
4+
@import FirebaseUI;
55

66
@interface FirebaseUIAuthPlugin : CDVPlugin < FUIAuthDelegate >
77

src/ios/FirebaseUIAuthPlugin.m

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#import "FirebaseUIAuthPlugin.h"
22
@import Firebase;
3-
@import FirebaseAuthUI;
4-
@import FirebaseGoogleAuthUI;
5-
@import FirebaseFacebookAuthUI;
3+
@import FirebaseUI;
64

75
@implementation FirebaseUIAuthPlugin
86

@@ -94,25 +92,25 @@ - (void)signInAnonymous {
9492

9593
if (user == nil) {
9694

97-
[[FIRAuth auth] signInAnonymouslyWithCompletion:^(FIRUser * _Nullable user, NSError * _Nullable error) {
98-
if (user != nil) {
99-
[self raiseEventForUser:user];
95+
[[FIRAuth auth] signInAnonymouslyWithCompletion:^(FIRAuthDataResult * _Nullable authResult, NSError * _Nullable error) {
96+
if ([authResult user] != nil) {
97+
[self raiseEventForUser:[authResult user]];
10098
} else if (error != nil) {
10199
NSDictionary *data = nil;
102-
100+
103101
if (error.localizedFailureReason != nil && error.localizedDescription != nil) {
104102
data = @{
105103
@"code" : [error localizedFailureReason],
106104
@"message" : [error localizedDescription]
107105
};
108106
} else {
109-
107+
110108
data = @{
111109
@"code" : @-1,
112110
@"message" : @"Unknown failure reason"
113111
};
114112
}
115-
113+
116114
[self raiseEvent:@"signinfailure" withData:data];
117115
}
118116
}];

0 commit comments

Comments
 (0)