FIRDynamicLink.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright 2018 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. NS_ASSUME_NONNULL_BEGIN
  18. /**
  19. * @file FIRDynamicLink.h
  20. * @abstract Dynamic Link object used in Firebase Dynamic Links.
  21. */
  22. /**
  23. * @abstract The match type of the Dynamic Link.
  24. */
  25. typedef NS_ENUM(NSUInteger, FIRDLMatchType) {
  26. /**
  27. * The match has not been achieved.
  28. */
  29. FIRDLMatchTypeNone,
  30. /**
  31. * The match between the Dynamic Link and this device may not be perfect, hence you should not
  32. * reveal any personal information related to the Dynamic Link.
  33. */
  34. FIRDLMatchTypeWeak,
  35. /**
  36. * The match between the Dynamic Link and this device has high confidence but small possibility of
  37. * error still exist.
  38. */
  39. FIRDLMatchTypeDefault,
  40. /**
  41. * The match between the Dynamic Link and this device is exact, hence you may reveal personal
  42. * information related to the Dynamic Link.
  43. */
  44. FIRDLMatchTypeUnique,
  45. } NS_SWIFT_NAME(DLMatchType);
  46. /**
  47. * @class FIRDynamicLink
  48. * @abstract A received Dynamic Link.
  49. */
  50. NS_SWIFT_NAME(DynamicLink)
  51. @interface FIRDynamicLink : NSObject
  52. /**
  53. * @property url
  54. * @abstract The URL that was passed to the app.
  55. */
  56. @property(nonatomic, copy, readonly, nullable) NSURL *url;
  57. /**
  58. * @property matchType
  59. * @abstract The match type of the received Dynamic Link.
  60. */
  61. @property(nonatomic, assign, readonly) FIRDLMatchType matchType;
  62. /**
  63. * @property utmParametersDictionary
  64. * @abstract UTM parameters associated with a Firebase Dynamic Link.
  65. */
  66. @property(nonatomic, copy, readonly) NSDictionary<NSString *, id> *utmParametersDictionary;
  67. /**
  68. * @property minimumAppVersion
  69. * @abstract The minimum iOS application version that supports the Dynamic Link. This is retrieved
  70. * from the imv= parameter of the Dynamic Link URL. Note: This is not the minimum iOS system
  71. * version, but the minimum app version. If app version of the opening app is less than the
  72. * value of this property, then app expected to open AppStore to allow user to download most
  73. * recent version. App can notify or ask user before opening AppStore.
  74. */
  75. @property(nonatomic, copy, readonly, nullable) NSString *minimumAppVersion;
  76. - (instancetype)init NS_UNAVAILABLE;
  77. @end
  78. NS_ASSUME_NONNULL_END