FIRActionCodeSettings.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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/LICENSE2.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. #import "FIRAuthSwiftNameSupport.h"
  18. NS_ASSUME_NONNULL_BEGIN
  19. /** @class FIRActionCodeSettings
  20. @brief Used to set and retrieve settings related to handling action codes.
  21. */
  22. FIR_SWIFT_NAME(ActionCodeSettings)
  23. @interface FIRActionCodeSettings : NSObject
  24. /** @property URL
  25. @brief This URL represents the state/Continue URL in the form of a universal link.
  26. @remarks This URL can should be contructed as a universal link that would either directly open
  27. the app where the action code would be handled or continue to the app after the action code
  28. is handled by Firebase.
  29. */
  30. @property(nonatomic, copy, nullable) NSURL *URL;
  31. /** @property handleCodeInApp
  32. @brief Indicates whether the action code link will open the app directly or after being
  33. redirected from a Firebase owned web widget.
  34. */
  35. @property(assign, nonatomic) BOOL handleCodeInApp;
  36. /** @property iOSBundleID
  37. @brief The iOS bundle ID, if available. The default value is the current app's bundle ID.
  38. */
  39. @property(copy, nonatomic, readonly, nullable) NSString *iOSBundleID;
  40. /** @property androidPackageName
  41. @brief The Android package name, if available.
  42. */
  43. @property(nonatomic, copy, readonly, nullable) NSString *androidPackageName;
  44. /** @property androidMinimumVersion
  45. @brief The minimum Android version supported, if available.
  46. */
  47. @property(nonatomic, copy, readonly, nullable) NSString *androidMinimumVersion;
  48. /** @property androidInstallIfNotAvailable
  49. @brief Indicates whether the Android app should be installed on a device where it is not
  50. available.
  51. */
  52. @property(nonatomic, assign, readonly) BOOL androidInstallIfNotAvailable;
  53. /** @fn setIOSBundleID
  54. @brief Sets the iOS bundle Id.
  55. @param iOSBundleID The iOS bundle ID.
  56. */
  57. - (void)setIOSBundleID:(NSString *)iOSBundleID;
  58. /** @fn setAndroidPackageName:installIfNotAvailable:minimumVersion:
  59. @brief Sets the Android package name, the flag to indicate whether or not to install the app and
  60. the minimum Android version supported.
  61. @param androidPackageName The Android package name.
  62. @param installIfNotAvailable Indicates whether or not the app should be installed if not
  63. available.
  64. @param minimumVersion The minimum version of Android supported.
  65. @remarks If installIfNotAvailable is set to YES and the link is opened on an android device, it
  66. will try to install the app if not already available. Otherwise the web URL is used.
  67. */
  68. - (void)setAndroidPackageName:(NSString *)androidPackageName
  69. installIfNotAvailable:(BOOL)installIfNotAvailable
  70. minimumVersion:(nullable NSString *)minimumVersion;
  71. @end
  72. NS_ASSUME_NONNULL_END