Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions FirebaseAuthUI/FUIAuthBaseViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
@interface FUIAuthBaseViewController : UIViewController

/** @typedef FUIAuthAlertActionHandler
@brief The type of block called when an alert view is dismissed by a user action.
*/
typedef void (^FUIAuthAlertActionHandler)(void);

/** @property auth
@brief The @c FIRAuth instance of the application.
*/
Expand Down Expand Up @@ -80,6 +85,39 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)cancelAuthorization;

/** @fn showSignInAlertWithEmail:provider:handler:
@brief Displays an alert asking the user to confirm whether or not they want to proceed with the selected provider.
@param email The email address to sign in with.
@param provider The identity provider to sign in with.
@param signinHandler Handler for the sign in action of the alert.
@param cancelHandler Handler for the cancel action of the alert.
*/
+ (void)showSignInAlertWithEmail:(NSString *)email
provider:(id<FUIAuthProvider>)provider
presentingViewController:(UIViewController *)presentingViewController
signinHandler:(FUIAuthAlertActionHandler)signinHandler
cancelHandler:(FUIAuthAlertActionHandler)cancelHandler;

/** @fn incrementActivity
@brief Increment the current activity count. If there's positive number of activities, display
and animate the activity indicator with a short delay.
@remarks Calls to @c incrementActivity and @c decrementActivity should be balanced.
*/
- (void)incrementActivity;

/** @fn decrementActivity
@brief Decrement the current activity count. If the count reaches 0, stop and hide the
activity indicator.
@remarks Calls to @c incrementActivity and @c decrementActivity should be balanced.
*/
- (void)decrementActivity;

/** @fn addActivityIndicator:
@briefCreates and adds an activity indicator to the center of the specified view.
@param view The view where indicator is shown.
*/
+ (UIActivityIndicatorView *)addActivityIndicator:(UIView *)view;

@end

NS_ASSUME_NONNULL_END
38 changes: 0 additions & 38 deletions FirebaseAuthUI/FUIAuthBaseViewController_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ NS_ASSUME_NONNULL_BEGIN

@interface FUIAuthBaseViewController (Internal)

/** @typedef FUIAuthAlertActionHandler
@brief The type of block called when an alert view is dismissed by a user action.
*/
typedef void (^FUIAuthAlertActionHandler)(void);

/** @fn isValidEmail:
@brief Statically validates email address.
@param email The email address to validate.
Expand Down Expand Up @@ -61,19 +56,6 @@ typedef void (^FUIAuthAlertActionHandler)(void);
actionTitle:(NSString *)actionTitle
presentingViewController:(UIViewController *)presentingViewController;

/** @fn showSignInAlertWithEmail:provider:handler:
@brief Displays an alert to conform with user whether she wants to proceed with the provider.
@param email The email address to sign in with.
@param provider The identity provider to sign in with.
@param signinHandler Handler for the sign in action of the alert.
@param cancelHandler Handler for the cancel action of the alert.
*/
+ (void)showSignInAlertWithEmail:(NSString *)email
provider:(id<FUIAuthProvider>)provider
presentingViewController:(UIViewController *)presentingViewController
signinHandler:(FUIAuthAlertActionHandler)signinHandler
cancelHandler:(FUIAuthAlertActionHandler)cancelHandler;

/** @fn pushViewController:
@brief Push the view controller to the navigation controller of the current view controller
with animation. The pushed view controller will have a fixed "Back" title for back button.
Expand All @@ -90,31 +72,11 @@ typedef void (^FUIAuthAlertActionHandler)(void);
+ (void)pushViewController:(UIViewController *)viewController
navigationController:(UINavigationController *)navigationController;

/** @fn incrementActivity
@brief Increment the current activity count. If there's positive number of activities, display
and animate the activity indicator with a short period of delay.
@remarks Calls to @c incrementActivity and @c decrementActivity should be balanced.
*/
- (void)incrementActivity;

/** @fn decrementActivity
@brief Decrement the current activity count. If the count reaches 0, stop and hide the
activity indicator.
@remarks Calls to @c incrementActivity and @c decrementActivity should be balanced.
*/
- (void)decrementActivity;

/** @fn providerLocalizedName:
@brief Maps provider Id to localized provider name.
*/
+ (NSString *)providerLocalizedName:(NSString *)providerId;

/** @fn addActivityIndicator:
@brief Creates and add activity indicator to the center of the specified view.
@param view The View where indicator is shown.
*/
+ (UIActivityIndicatorView *)addActivityIndicator:(UIView *)view;

/** @fn barItemWithTitle:target:action:
@brief Creates multiline @c UIBarButtonItem of fixed width.
@param title The title of the button.
Expand Down