From 96ca29ca6e78be3732041ad106be9de70196a797 Mon Sep 17 00:00:00 2001 From: Ali Ammar Date: Wed, 13 May 2020 14:39:55 +0300 Subject: [PATCH] RxFirebase 0.3.9 --- Sources/Auth/FIRAuth+Rx.swift | 18 +++++++++--------- Sources/Auth/FIRUser+Rx.swift | 6 +++--- Sources/RemoteConfig/RemoteConfig+Rx.swift | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Sources/Auth/FIRAuth+Rx.swift b/Sources/Auth/FIRAuth+Rx.swift index 67e58e5..a771000 100644 --- a/Sources/Auth/FIRAuth+Rx.swift +++ b/Sources/Auth/FIRAuth+Rx.swift @@ -47,7 +47,7 @@ extension Reactive where Base: Auth { */ public func fetchProviders(forEmail email: String) -> Observable<[String]> { return Observable.create { observer in - self.base.fetchProviders(forEmail: email) { providers, error in + self.base.fetchSignInMethods(forEmail: email) { providers, error in guard let error = error else { observer.onNext(providers ?? []) observer.onCompleted() @@ -59,7 +59,7 @@ extension Reactive where Base: Auth { } } - /** + /** @brief Fetches the list of all sign-in methods previously used for the provided email address. @param email The email address for which to obtain a list of sign-in methods. @@ -155,7 +155,7 @@ extension Reactive where Base: Auth { } } - /** + /** @brief Asynchronously signs in to Firebase with the given 3rd-party credentials (e.g. a Facebook login Access Token, a Google ID Token/Access Token pair, etc.) and returns additional identity provider data. @@ -197,7 +197,7 @@ extension Reactive where Base: Auth { */ public func signInAndRetrieveData(with credential: AuthCredential) -> Observable { return Observable.create { observer in - self.base.signInAndRetrieveData(with: credential) { auth, error in + self.base.signIn(with: credential) { auth, error in if let error = error { observer.onError(error) } else if let auth = auth { @@ -270,7 +270,7 @@ extension Reactive where Base: Auth { } } - /** + /** @brief Creates and, on success, signs in a user with the given email address and password. @param email The user's email address. @@ -339,7 +339,7 @@ extension Reactive where Base: Auth { } } - /** + /** @brief Checks the validity of an out of band code. @param code The out of band code to check validity. @@ -360,7 +360,7 @@ extension Reactive where Base: Auth { } } - /** + /** @brief Checks the validity of a verify password reset code. @param code The password reset code to be verified. @@ -405,7 +405,7 @@ extension Reactive where Base: Auth { } } - /** + /** @brief Initiates a password reset for the given email address. @param email The email address of the user. @@ -531,7 +531,7 @@ extension Reactive where Base: Auth { } } - /** + /** @brief Registers a block as an "ID token did change" listener. To be invoked when: + The block is registered as a listener, diff --git a/Sources/Auth/FIRUser+Rx.swift b/Sources/Auth/FIRUser+Rx.swift index 8aa49f4..b8f5a3a 100644 --- a/Sources/Auth/FIRUser+Rx.swift +++ b/Sources/Auth/FIRUser+Rx.swift @@ -186,7 +186,7 @@ extension Reactive where Base: User { */ public func reauthenticateAndRetrieveData(with credential: AuthCredential) -> Observable { return Observable.create { observer in - self.base.reauthenticateAndRetrieveData(with: credential) { result, error in + self.base.reauthenticate(with: credential) { result, error in if let error = error { observer.onError(error) } else if let result = result { @@ -296,7 +296,7 @@ extension Reactive where Base: User { } } - /** + /** @brief Associates a user account from a third-party identity provider with this user and returns additional identity provider data. @@ -322,7 +322,7 @@ extension Reactive where Base: User { */ public func linkAndRetrieveData(with credential: AuthCredential) -> Observable { return Observable.create { observer in - self.base.linkAndRetrieveData(with: credential) { result, error in + self.base.link(with: credential) { result, error in if let error = error { observer.onError(error) } else if let result = result { diff --git a/Sources/RemoteConfig/RemoteConfig+Rx.swift b/Sources/RemoteConfig/RemoteConfig+Rx.swift index 66d92a3..6435b74 100644 --- a/Sources/RemoteConfig/RemoteConfig+Rx.swift +++ b/Sources/RemoteConfig/RemoteConfig+Rx.swift @@ -20,7 +20,7 @@ extension Reactive where Base: RemoteConfig { self.base.fetch { status, error in guard let error = error else { if activateFetched, status == .success { - self.base.activateFetched() + self.base.activate() } observer.onNext(status) observer.onCompleted() @@ -42,7 +42,7 @@ extension Reactive where Base: RemoteConfig { self.base.fetch(withExpirationDuration: duration) { status, error in guard let error = error else { if activateFetched, status == .success { - self.base.activateFetched() + self.base.activate() } observer.onNext(status) observer.onCompleted()