FIRAuthUIDelegate.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #include <TargetConditionals.h>
  17. #if !TARGET_OS_OSX
  18. #import <Foundation/Foundation.h>
  19. @class UIViewController;
  20. NS_ASSUME_NONNULL_BEGIN
  21. /** @protocol FIRAuthUIDelegate
  22. @brief A protocol to handle user interface interactions for Firebase Auth.
  23. */
  24. NS_SWIFT_NAME(AuthUIDelegate)
  25. @protocol FIRAuthUIDelegate <NSObject>
  26. /** @fn presentViewController:animated:completion:
  27. @brief If implemented, this method will be invoked when Firebase Auth needs to display a view
  28. controller.
  29. @param viewControllerToPresent The view controller to be presented.
  30. @param flag Decides whether the view controller presentation should be animated or not.
  31. @param completion The block to execute after the presentation finishes. This block has no return
  32. value and takes no parameters.
  33. */
  34. - (void)presentViewController:(UIViewController *)viewControllerToPresent
  35. animated:(BOOL)flag
  36. completion:(void (^_Nullable)(void))completion;
  37. /** @fn dismissViewControllerAnimated:completion:
  38. @brief If implemented, this method will be invoked when Firebase Auth needs to display a view
  39. controller.
  40. @param flag Decides whether removing the view controller should be animated or not.
  41. @param completion The block to execute after the presentation finishes. This block has no return
  42. value and takes no parameters.
  43. */
  44. - (void)dismissViewControllerAnimated:(BOOL)flag
  45. completion:(void (^_Nullable)(void))completion
  46. NS_SWIFT_NAME(dismiss(animated:completion:));
  47. @end
  48. NS_ASSUME_NONNULL_END
  49. #endif