FIRAuthUIDelegate.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #import <Foundation/Foundation.h>
  17. @class UIViewController;
  18. NS_ASSUME_NONNULL_BEGIN
  19. /** @protocol FIRAuthUIDelegate
  20. @brief A protocol to handle user interface interactions for Firebase Auth.
  21. This protocol is available on iOS, macOS Catalyst, and tvOS only.
  22. */
  23. NS_SWIFT_NAME(AuthUIDelegate) API_UNAVAILABLE(macosx, watchos) @protocol FIRAuthUIDelegate<NSObject>
  24. /** @fn presentViewController:animated:completion:
  25. @brief If implemented, this method will be invoked when Firebase Auth needs to display a view
  26. controller.
  27. @param viewControllerToPresent The view controller to be presented.
  28. @param flag Decides whether the view controller presentation should be animated or not.
  29. @param completion The block to execute after the presentation finishes. This block has no return
  30. value and takes no parameters.
  31. */
  32. - (void)presentViewController:(UIViewController *)viewControllerToPresent
  33. animated:(BOOL)flag
  34. completion:(void (^_Nullable)(void))completion;
  35. /** @fn dismissViewControllerAnimated:completion:
  36. @brief If implemented, this method will be invoked when Firebase Auth needs to display a view
  37. controller.
  38. @param flag Decides whether removing the view controller should be animated or not.
  39. @param completion The block to execute after the presentation finishes. This block has no return
  40. value and takes no parameters.
  41. */
  42. - (void)dismissViewControllerAnimated:(BOOL)flag
  43. completion:(void (^_Nullable)(void))completion
  44. NS_SWIFT_NAME(dismiss(animated:completion:));
  45. @end
  46. NS_ASSUME_NONNULL_END