aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase
diff options
context:
space:
mode:
authorGravatar Xiangtian Dai <xiangtian@google.com>2017-09-06 09:25:19 -0700
committerGravatar GitHub <noreply@github.com>2017-09-06 09:25:19 -0700
commitb5ed1c60f66310b59a63fca268d9d5e1cdd5365d (patch)
treea26ebe72bd677865e661a32e0e4095a1f0528f46 /Firebase
parent55d2d2d8be0b99f03da003f06cf4cd5c961c8637 (diff)
Switchs Auth Swift sample to use the new phone number auth API. (#237)
Also fixes macOS tests.
Diffstat (limited to 'Firebase')
-rw-r--r--Firebase/Auth/FirebaseAuth.podspec1
-rw-r--r--Firebase/Auth/Source/Public/FIRAuth.h28
-rw-r--r--Firebase/Auth/Source/Public/FIRAuthUIDelegate.h5
-rw-r--r--Firebase/Auth/Source/Public/FirebaseAuth.h1
4 files changed, 21 insertions, 14 deletions
diff --git a/Firebase/Auth/FirebaseAuth.podspec b/Firebase/Auth/FirebaseAuth.podspec
index 6d07375..86577ad 100644
--- a/Firebase/Auth/FirebaseAuth.podspec
+++ b/Firebase/Auth/FirebaseAuth.podspec
@@ -31,6 +31,7 @@ Simplify your iOS development, grow your user base, and monetize more effectivel
'Source/**/FIRAuthAPNSTokenType.[mh]',
'Source/**/FIRAuthAPNSToken.[mh]',
'Source/**/FIRAuthDefaultUIDelegate.[mh]',
+ 'Source/**/FIRAuthUIDelegate.h',
'Source/**/FIRAuthURLPresenter.[mh],
'Source/**/FIRPhoneAuthCredential.[mh]',
'Source/**/FIRPhoneAuthProvider.[mh]'
diff --git a/Firebase/Auth/Source/Public/FIRAuth.h b/Firebase/Auth/Source/Public/FIRAuth.h
index eeb7ff9..eabcf23 100644
--- a/Firebase/Auth/Source/Public/FIRAuth.h
+++ b/Firebase/Auth/Source/Public/FIRAuth.h
@@ -280,18 +280,6 @@ FIR_SWIFT_NAME(Auth)
*/
- (instancetype)init NS_UNAVAILABLE;
-/** @fn canHandleURL:
- @brief Whether the specific URL is handled by @c FIRAuth .
- @param URL The URL received by the application delegate from any of the openURL method.
- @return Whether or the URL is handled. YES means the URL is for Firebase Auth
- so the caller should ignore the URL from further processing, and NO means the
- the URL is for the app (or another libaray) so the caller should continue handling
- this URL as usual.
- @remarks If swizzling is disabled, URLs received by the application delegate must be forwarded
- to this method for phone number auth to work.
- */
-- (BOOL)canHandleURL:(nonnull NSURL *)URL;
-
/** @fn fetchProvidersForEmail:completion:
@brief Fetches the list of IdPs that can be used for signing in with the provided email address.
Useful for an "identifier-first" sign-in flow.
@@ -675,6 +663,19 @@ FIR_SWIFT_NAME(Auth)
- (void)useAppLanguage;
#if TARGET_OS_IOS
+
+/** @fn canHandleURL:
+ @brief Whether the specific URL is handled by @c FIRAuth .
+ @param URL The URL received by the application delegate from any of the openURL method.
+ @return Whether or the URL is handled. YES means the URL is for Firebase Auth
+ so the caller should ignore the URL from further processing, and NO means the
+ the URL is for the app (or another libaray) so the caller should continue handling
+ this URL as usual.
+ @remarks If swizzling is disabled, URLs received by the application delegate must be forwarded
+ to this method for phone number auth to work.
+ */
+- (BOOL)canHandleURL:(nonnull NSURL *)URL;
+
/** @fn setAPNSToken:type:
@brief Sets the APNs token along with its type.
@remarks If swizzling is disabled, the APNs Token must be set for phone number auth to work,
@@ -694,7 +695,8 @@ FIR_SWIFT_NAME(Auth)
for phone number auth to work.
*/
- (BOOL)canHandleNotification:(NSDictionary *)userInfo;
-#endif
+
+#endif // TARGET_OS_IOS
@end
diff --git a/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h b/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h
index 7f9adb0..a8d0549 100644
--- a/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h
+++ b/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h
@@ -17,6 +17,8 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
+#import "FIRAuthSwiftNameSupport.h"
+
NS_ASSUME_NONNULL_BEGIN
/** @protocol FIRAuthUIDelegate
@@ -44,7 +46,8 @@ NS_ASSUME_NONNULL_BEGIN
@param completion The block to execute after the presentation finishes. This block has no return
value and takes no parameters.
*/
-- (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^ _Nullable)(void))completion;
+- (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^ _Nullable)(void))completion
+ FIR_SWIFT_NAME(dismiss(animated:completion:));
@end
diff --git a/Firebase/Auth/Source/Public/FirebaseAuth.h b/Firebase/Auth/Source/Public/FirebaseAuth.h
index 126645e..cd17b45 100644
--- a/Firebase/Auth/Source/Public/FirebaseAuth.h
+++ b/Firebase/Auth/Source/Public/FirebaseAuth.h
@@ -34,6 +34,7 @@
#import "FirebaseAuthVersion.h"
#if TARGET_OS_IOS
+#import "FIRAuthUIDelegate.h"
#import "FIRPhoneAuthCredential.h"
#import "FIRPhoneAuthProvider.h"
#import "FIRAuthAPNSTokenType.h"