FDLURLComponents.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  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_SWIFT_NAME can only translate factory methods before the iOS 9.3 SDK.
  18. // Wrap it in our own macro if it's a non-compatible SDK.
  19. #ifndef FIR_SWIFT_NAME
  20. #ifdef __IPHONE_9_3
  21. #define FIR_SWIFT_NAME(X) NS_SWIFT_NAME(X)
  22. #else
  23. #define FIR_SWIFT_NAME(X) // Intentionally blank.
  24. #endif // #ifdef __IPHONE_9_3
  25. #endif // #ifndef FIR_SWIFT_NAME
  26. NS_ASSUME_NONNULL_BEGIN
  27. /**
  28. * @abstract Enum used to define the desired path length for shortened Dynamic Link URLs.
  29. */
  30. typedef NS_ENUM(NSInteger, FIRShortDynamicLinkPathLength) {
  31. /**
  32. * Uses the server-default for the path length. See https://goo.gl/8yDAqC for more information.
  33. */
  34. FIRShortDynamicLinkPathLengthDefault = 0,
  35. /** Typical short link for non-sensitive links. */
  36. FIRShortDynamicLinkPathLengthShort,
  37. /** Short link with an extra long path for great difficulty in guessing. */
  38. FIRShortDynamicLinkPathLengthUnguessable,
  39. } FIR_SWIFT_NAME(ShortDynamicLinkPathLength);
  40. /**
  41. * @abstract The definition of the completion block used by URL shortener.
  42. * @param shortURL Shortened URL.
  43. * @param warnings Warnings that describe usability or function limitations of the generated
  44. * short link. Usually presence of warnings means parameteres format error, parametres value
  45. * error or missing parameter.
  46. * @param error Error if URL can't be shortened.
  47. */
  48. typedef void (^FIRDynamicLinkShortenerCompletion)(NSURL *_Nullable shortURL,
  49. NSArray<NSString *> *_Nullable warnings,
  50. NSError *_Nullable error)
  51. FIR_SWIFT_NAME(DynamicLinkShortenerCompletion);
  52. /**
  53. * @class FIRDynamicLinkGoogleAnalyticsParameters
  54. * @abstract The Dynamic Link analytics parameters.
  55. */
  56. FIR_SWIFT_NAME(DynamicLinkGoogleAnalyticsParameters)
  57. @interface FIRDynamicLinkGoogleAnalyticsParameters : NSObject
  58. /**
  59. * @property source
  60. * @abstract The utm_source analytics parameter.
  61. */
  62. @property(nonatomic, copy, nullable) NSString *source;
  63. /**
  64. * @property medium
  65. * @abstract The utm_medium analytics parameter.
  66. */
  67. @property(nonatomic, copy, nullable) NSString *medium;
  68. /**
  69. * @property campaign
  70. * @abstract The utm_campaign analytics parameter.
  71. */
  72. @property(nonatomic, copy, nullable) NSString *campaign;
  73. /**
  74. * @property term
  75. * @abstract The utm_term analytics parameter.
  76. */
  77. @property(nonatomic, copy, nullable) NSString *term;
  78. /**
  79. * @property content
  80. * @abstract The utm_content analytics parameter.
  81. */
  82. @property(nonatomic, copy, nullable) NSString *content;
  83. /**
  84. * @method parametersWithSource:medium:campaign:
  85. * @abstract The preferred factory method for creating the analytics parameters object. It includes
  86. * the commonly-used source, medium, and campaign fields.
  87. * @param source The utm_source analytics parameter.
  88. * @param medium The utm_medium analytics parameter.
  89. * @param campaign The utm_campaign analytics parameter.
  90. * @return Returns An object to be used with FIRDynamicLinkURLComponents to add analytics parameters
  91. * to a generated Dynamic Link URL.
  92. */
  93. + (instancetype)parametersWithSource:(NSString *)source
  94. medium:(NSString *)medium
  95. campaign:(NSString *)campaign
  96. NS_SWIFT_UNAVAILABLE("Use init(source:medium:campaign:)");
  97. /**
  98. * @method parameters
  99. * @abstract A factory method for creating the analytics parameters object.
  100. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add analytics parameters
  101. * to a generated Dynamic Link URL.
  102. */
  103. + (instancetype)parameters NS_SWIFT_UNAVAILABLE("Use init()");
  104. /**
  105. * @method initWithSource:medium:campaign:
  106. * @abstract The preferred instance method for creating the analytics parameters object. It
  107. * includes the commonly-used source, medium, and campaign fields.
  108. * @param source The utm_source analytics parameter.
  109. * @param medium The utm_medium analytics parameter.
  110. * @param campaign The utm_campaign analytics parameter.
  111. * @return Returns An object to be used with FIRDynamicLinkURLComponents to add analytics parameters
  112. * to a generated Dynamic Link URL.
  113. */
  114. - (instancetype)initWithSource:(NSString *)source
  115. medium:(NSString *)medium
  116. campaign:(NSString *)campaign;
  117. /**
  118. * @method init
  119. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add analytics parameters
  120. * to a generated Dynamic Link URL.
  121. */
  122. - (instancetype)init;
  123. @end
  124. /**
  125. * @class FIRDynamicLinkIOSParameters
  126. * @abstract The Dynamic Link iOS parameters.
  127. */
  128. FIR_SWIFT_NAME(DynamicLinkIOSParameters)
  129. @interface FIRDynamicLinkIOSParameters : NSObject
  130. /**
  131. * @property bundleID
  132. * @abstract The bundle ID of the iOS app to use to open the link.
  133. */
  134. @property(nonatomic, copy, nullable, readonly) NSString *bundleID;
  135. /**
  136. * @property appStoreID
  137. * @abstract The appStore ID of the iOS app in AppStore.
  138. */
  139. @property(nonatomic, copy, nullable) NSString *appStoreID;
  140. /**
  141. * @property fallbackURL
  142. * @abstract The link to open when the app isn't installed. Specify this to do something other than
  143. * install the app from the App Store when the app isn't installed, such as open the mobile
  144. * web version of the content, or display a promotional page for the app.
  145. */
  146. @property(nonatomic, nullable) NSURL *fallbackURL;
  147. /**
  148. * @property customScheme
  149. * @abstract The target app's custom URL scheme, if defined to be something other than the app's
  150. * bundle ID
  151. */
  152. @property(nonatomic, copy, nullable) NSString *customScheme;
  153. /**
  154. * @property iPadBundleID
  155. * @abstract The bundle ID of the iOS app to use on iPads to open the link. This is only required if
  156. * there are separate iPhone and iPad applications.
  157. */
  158. @property(nonatomic, copy, nullable) NSString *iPadBundleID;
  159. /**
  160. * @property iPadFallbackURL
  161. * @abstract The link to open on iPads when the app isn't installed. Specify this to do something
  162. * other than install the app from the App Store when the app isn't installed, such as open the
  163. * web version of the content, or display a promotional page for the app.
  164. */
  165. @property(nonatomic, nullable) NSURL *iPadFallbackURL;
  166. /**
  167. @property minimumAppVersion
  168. @abstract The the minimum version of your app that can open the link. If the
  169. * installed app is an older version, the user is taken to the AppStore to upgrade the app.
  170. * Note: It is app's developer responsibility to open AppStore when received link declares
  171. * higher minimumAppVersion than currently installed.
  172. */
  173. @property(nonatomic, copy, nullable) NSString *minimumAppVersion;
  174. /**
  175. * @method parametersWithBundleID:
  176. * @abstract A method for creating the iOS parameters object.
  177. * @param bundleID The bundle ID of the iOS app to use to open the link.
  178. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add iOS parameters to a
  179. * generated Dynamic Link URL.
  180. */
  181. + (instancetype)parametersWithBundleID:(NSString *)bundleID
  182. NS_SWIFT_UNAVAILABLE("Use initWithBundleID()");
  183. /**
  184. * @method initWithBundleID:
  185. * @abstract A method for creating the iOS parameters object.
  186. * @param bundleID The bundle ID of the iOS app to use to open the link.
  187. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add iOS parameters to a
  188. * generated Dynamic Link URL.
  189. */
  190. - (instancetype)initWithBundleID:(NSString *)bundleID;
  191. @end
  192. /**
  193. * @class FIRDynamicLinkItunesConnectAnalyticsParameters
  194. * @abstract The Dynamic Link iTunes Connect parameters.
  195. */
  196. FIR_SWIFT_NAME(DynamicLinkItunesConnectAnalyticsParameters)
  197. @interface FIRDynamicLinkItunesConnectAnalyticsParameters : NSObject
  198. /**
  199. * @property affiliateToken
  200. * @abstract The iTunes Connect affiliate token.
  201. */
  202. @property(nonatomic, copy, nullable) NSString *affiliateToken;
  203. /**
  204. * @property campaignToken
  205. * @abstract The iTunes Connect campaign token.
  206. */
  207. @property(nonatomic, copy, nullable) NSString *campaignToken;
  208. /**
  209. * @property providerToken
  210. * @abstract The iTunes Connect provider token.
  211. */
  212. @property(nonatomic, copy, nullable) NSString *providerToken;
  213. /**
  214. * @method parameters
  215. * @abstract A method for creating the iTunes Connect parameters object.
  216. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add iTunes Connect
  217. * parameters to a generated Dynamic Link URL.
  218. */
  219. + (instancetype)parameters NS_SWIFT_UNAVAILABLE("Use init()");
  220. /**
  221. * @method init
  222. * @abstract A method for creating the iTunes Connect parameters object.
  223. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add iTunes Connect
  224. * parameters to a generated Dynamic Link URL.
  225. */
  226. - (instancetype)init;
  227. @end
  228. /**
  229. * @class FIRDynamicLinkAndroidParameters
  230. * @abstract The Dynamic Link Android parameters.
  231. */
  232. FIR_SWIFT_NAME(DynamicLinkAndroidParameters)
  233. @interface FIRDynamicLinkAndroidParameters : NSObject
  234. /**
  235. * @property packageName
  236. * @abstract The Android app's package name.
  237. */
  238. @property(nonatomic, copy, nullable, readonly) NSString *packageName;
  239. /**
  240. * @property fallbackURL
  241. * @abstract The link to open when the app isn't installed. Specify this to do something other than
  242. * install the app from the Play Store when the app isn't installed, such as open the mobile web
  243. * version of the content, or display a promotional page for the app.
  244. */
  245. @property(nonatomic, nullable) NSURL *fallbackURL;
  246. /**
  247. @property minimumVersion
  248. @abstract The version code of the minimum version of your app that can open the link. If the
  249. * installed app is an older version, the user is taken to the Play Store to upgrade the app.
  250. */
  251. @property(nonatomic) NSInteger minimumVersion;
  252. /**
  253. * @method parametersWithPackageName:
  254. * @abstract A method for creating the Android parameters object.
  255. * @param packageName The Android app's package name.
  256. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add Android parameters
  257. * to a generated Dynamic Link URL.
  258. */
  259. + (instancetype)parametersWithPackageName:(NSString *)packageName
  260. NS_SWIFT_UNAVAILABLE("Use initWithPackageName()");
  261. /**
  262. * @method initWithPackageName:
  263. * @abstract A method for creating the Android parameters object.
  264. * @param packageName The Android app's package name.
  265. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add Android parameters
  266. * to a generated Dynamic Link URL.
  267. */
  268. - (instancetype)initWithPackageName:(NSString *)packageName;
  269. @end
  270. /**
  271. * @class FIRDynamicLinkSocialMetaTagParameters
  272. * @abstract The Dynamic Link Social Meta Tag parameters.
  273. */
  274. FIR_SWIFT_NAME(DynamicLinkSocialMetaTagParameters)
  275. @interface FIRDynamicLinkSocialMetaTagParameters : NSObject
  276. /**
  277. * @property title
  278. * @abstract The title to use when the Dynamic Link is shared in a social post.
  279. */
  280. @property(nonatomic, copy, nullable) NSString *title;
  281. /**
  282. * @property descriptionText
  283. * @abstract The description to use when the Dynamic Link is shared in a social post.
  284. */
  285. @property(nonatomic, copy, nullable) NSString *descriptionText;
  286. /**
  287. * @property imageURL
  288. * @abstract The URL to an image related to this link.
  289. */
  290. @property(nonatomic, nullable) NSURL *imageURL;
  291. /**
  292. * @method parameters
  293. * @abstract A method for creating the Social Meta Tag parameters object.
  294. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add Social Meta Tag
  295. * parameters to a generated Dynamic Link URL.
  296. */
  297. + (instancetype)parameters NS_SWIFT_UNAVAILABLE("Use init()");
  298. /**
  299. * @method init
  300. * @abstract A method for creating the Social Meta Tag parameters object.
  301. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add Social Meta Tag
  302. * parameters to a generated Dynamic Link URL.
  303. */
  304. - (instancetype)init;
  305. @end
  306. /**
  307. * @class FIRDynamicLinkNavigationInfoParameters
  308. * @abstract Options class for defining navigation behavior of the Dynamic Link.
  309. */
  310. FIR_SWIFT_NAME(DynamicLinkNavigationInfoParameters)
  311. @interface FIRDynamicLinkNavigationInfoParameters : NSObject
  312. /**
  313. * @property forcedRedirectEnabled
  314. * @abstract Property defines should forced non-interactive redirect be used when link is tapped on
  315. * mobile device. Default behavior is to disable force redirect and show interstitial page where
  316. * user tap will initiate navigation to the App (or AppStore if not installed). Disabled force
  317. * redirect normally improves reliability of the click.
  318. */
  319. @property(nonatomic, getter=isForcedRedirectEnabled) BOOL forcedRedirectEnabled;
  320. /**
  321. * @method parameters
  322. * @abstract A method for creating the Navigation Info parameters object.
  323. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add Navigation Info
  324. * parameters to a generated Dynamic Link URL.
  325. */
  326. + (instancetype)parameters NS_SWIFT_UNAVAILABLE("Use init()");
  327. /**
  328. * @method init
  329. * @abstract A method for creating the Navigation Info parameters object.
  330. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add Navigation Info
  331. * parameters to a generated Dynamic Link URL.
  332. */
  333. - (instancetype)init;
  334. @end
  335. /**
  336. * @class FIRDynamicLinkOtherPlatformParameters
  337. * @abstract Options class for defining other platform(s) parameters of the Dynamic Link.
  338. * Other here means not covered by specific parameters (not iOS and not Android).
  339. */
  340. FIR_SWIFT_NAME(DynamicLinkOtherPlatformParameters)
  341. @interface FIRDynamicLinkOtherPlatformParameters : NSObject
  342. /**
  343. * @property fallbackUrl
  344. * @abstract Property defines fallback URL to navigate to when Dynamic Link is clicked on
  345. * other platform.
  346. */
  347. @property(nonatomic, nullable) NSURL *fallbackUrl;
  348. /**
  349. * @method parameters
  350. * @abstract A method for creating the Other platform parameters object.
  351. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add Other Platform
  352. * parameters to a generated Dynamic Link URL.
  353. */
  354. + (instancetype)parameters NS_SWIFT_UNAVAILABLE("Use init()");
  355. /**
  356. * @method init
  357. * @abstract A method for creating the Other platform parameters object.
  358. * @return Returns an object to be used with FIRDynamicLinkURLComponents to add Other Platform
  359. * parameters to a generated Dynamic Link URL.
  360. */
  361. - (instancetype)init;
  362. @end
  363. /**
  364. * @class FIRDynamicLinkComponentsOptions
  365. * @abstract Options class for defining how Dynamic Link URLs are generated.
  366. */
  367. FIR_SWIFT_NAME(DynamicLinkComponentsOptions)
  368. @interface FIRDynamicLinkComponentsOptions : NSObject
  369. /**
  370. * @property pathLength
  371. * @abstract Specifies the length of the path component of a short Dynamic Link.
  372. */
  373. @property(nonatomic) FIRShortDynamicLinkPathLength pathLength;
  374. /**
  375. * @method options
  376. * @abstract A method for creating the Dynamic Link components options object.
  377. * @return Returns an object to be used with FIRDynamicLinkURLComponents to specify options related
  378. * to the generation of Dynamic Link URLs.
  379. */
  380. + (instancetype)options NS_SWIFT_UNAVAILABLE("Use init()");
  381. /**
  382. * @method init
  383. * @abstract A method for creating the Dynamic Link components options object.
  384. * @return Returns an object to be used with FIRDynamicLinkURLComponents to specify options related
  385. * to the generation of Dynamic Link URLs.
  386. */
  387. - (instancetype)init;
  388. @end
  389. /**
  390. * @class FIRDynamicLinkComponents
  391. * @abstract The class used for Dynamic Link URL generation; supports creation of short and long
  392. * Dynamic Link URLs. Short URLs will have a domain and a randomized path; long URLs will have a
  393. * domain and a query that contains all of the Dynamic Link parameters.
  394. */
  395. FIR_SWIFT_NAME(DynamicLinkComponents)
  396. @interface FIRDynamicLinkComponents : NSObject
  397. /**
  398. * @property analyticsParameters
  399. * @abstract Applies Analytics parameters to a generated Dynamic Link URL.
  400. */
  401. @property(nonatomic, nullable) FIRDynamicLinkGoogleAnalyticsParameters *analyticsParameters;
  402. /**
  403. * @property socialMetaTagParameters
  404. * @abstract Applies Social Meta Tag parameters to a generated Dynamic Link URL.
  405. */
  406. @property(nonatomic, nullable) FIRDynamicLinkSocialMetaTagParameters *socialMetaTagParameters;
  407. /**
  408. * @property iOSParameters
  409. * @abstract Applies iOS parameters to a generated Dynamic Link URL.
  410. */
  411. @property(nonatomic, nullable) FIRDynamicLinkIOSParameters *iOSParameters;
  412. /**
  413. * @property iTunesConnectParameters
  414. * @abstract Applies iTunes Connect parameters to a generated Dynamic Link URL.
  415. */
  416. @property(nonatomic, nullable)
  417. FIRDynamicLinkItunesConnectAnalyticsParameters *iTunesConnectParameters;
  418. /**
  419. * @property androidParameters
  420. * @abstract Applies Android parameters to a generated Dynamic Link URL.
  421. */
  422. @property(nonatomic, nullable) FIRDynamicLinkAndroidParameters *androidParameters;
  423. /**
  424. * @property navigationInfoParameters
  425. * @abstract Applies Navigation Info parameters to a generated Dynamic Link URL.
  426. */
  427. @property(nonatomic, nullable) FIRDynamicLinkNavigationInfoParameters *navigationInfoParameters;
  428. /**
  429. * @property otherPlatformParameters
  430. * @abstract Applies Other platform parameters to a generated Dynamic Link URL.
  431. */
  432. @property(nonatomic, nullable) FIRDynamicLinkOtherPlatformParameters *otherPlatformParameters;
  433. /**
  434. * @property options
  435. * @abstract Defines behavior for generating Dynamic Link URLs.
  436. */
  437. @property(nonatomic, nullable) FIRDynamicLinkComponentsOptions *options;
  438. /**
  439. * @property link
  440. * @abstract The link the target app will open. You can specify any URL the app can handle, such as
  441. * a link to the app's content, or a URL that initiates some app-specific logic such as
  442. * crediting the user with a coupon, or displaying a specific welcome screen. This link must be
  443. * a well-formatted URL, be properly URL-encoded, and use the HTTP or HTTPS scheme.
  444. */
  445. @property(nonatomic) NSURL *link;
  446. /**
  447. * @property domain
  448. * @abstract The Firebase project's Dynamic Links domain. You can find this value in the Dynamic
  449. * Links section of the Firebase console.
  450. * https://console.firebase.google.com/
  451. */
  452. @property(nonatomic, nullable, copy) NSString *domain;
  453. /**
  454. * @property url
  455. * @abstract A generated long Dynamic Link URL.
  456. */
  457. @property(nonatomic, nullable, readonly) NSURL *url;
  458. /**
  459. * @method componentsWithLink:domainURIPrefix:
  460. * @abstract Generates a Dynamic Link URL components object with the minimum necessary parameters
  461. * set to generate a fully-functional Dynamic Link.
  462. * @param link Deep link to be stored in created Dynamic link. This link also called "payload" of
  463. * the Dynamic link.
  464. * @param domainURIPrefix Domain URI Prefix of your App. This value must be your assigned
  465. * domain from the Firebase console. (e.g. https://xyz.page.link) The domain URI prefix must
  466. * start with a valid HTTPS scheme (https://).
  467. * @return Returns an instance of FIRDynamicLinkComponents if the parameters succeed validation,
  468. * else returns nil.
  469. */
  470. + (nullable instancetype)componentsWithLink:(NSURL *)link
  471. domainURIPrefix:(NSString *)domainURIPrefix
  472. NS_SWIFT_UNAVAILABLE("Use init(link:domainURIPrefix:)");
  473. /**
  474. * @method initWithLink:domainURIPrefix:
  475. * @abstract Generates a Dynamic Link URL components object with the minimum necessary parameters
  476. * set to generate a fully-functional Dynamic Link.
  477. * @param link Deep link to be stored in created Dynamic link. This link also called "payload" of
  478. * the Dynamic link.
  479. * @param domainURIPrefix Domain URI Prefix of your App. This value must be your assigned
  480. * domain from the Firebase console. (e.g. https://xyz.page.link) The domain URI prefix must
  481. * start with a valid HTTPS scheme (https://).
  482. * @return Returns an instance of FIRDynamicLinkComponents if the parameters succeed validation,
  483. * else returns nil.
  484. */
  485. - (nullable instancetype)initWithLink:(NSURL *)link domainURIPrefix:(NSString *)domainURIPrefix;
  486. /**
  487. * @method shortenURL:options:completion:
  488. * @abstract Shortens a Dynamic Link URL. This method may be used for shortening a custom URL that
  489. * was not generated using FIRDynamicLinkComponents.
  490. * @param url A properly-formatted long Dynamic Link URL.
  491. * @param completion A block to be executed upon completion of the shortening attempt. It is
  492. * guaranteed to be executed once and on the main thread.
  493. */
  494. + (void)shortenURL:(NSURL *)url
  495. options:(FIRDynamicLinkComponentsOptions *_Nullable)options
  496. completion:(FIRDynamicLinkShortenerCompletion)completion;
  497. /**
  498. * @method shortenWithCompletion:
  499. * @abstract Generates a short Dynamic Link URL using all set parameters.
  500. * @param completion A block to be executed upon completion of the shortening attempt. It is
  501. * guaranteed to be executed once and on the main thread.
  502. */
  503. - (void)shortenWithCompletion:(FIRDynamicLinkShortenerCompletion)completion;
  504. @end
  505. NS_ASSUME_NONNULL_END