Stay organized with collections
Save and categorize content based on your preferences.
DynamicLinkComponents
classDynamicLinkComponents:NSObject
The class used for Dynamic Link URL generation; supports creation of short and long
Dynamic Link URLs. Short URLs will have a domain and a randomized path; long URLs will have a
domain and a query that contains all of the Dynamic Link parameters.
The link the target app will open. You can specify any URL the app can handle, such as
a link to the app’s content, or a URL that initiates some app-specific logic such as
crediting the user with a coupon, or displaying a specific welcome screen. This link must be
a well-formatted URL, be properly URL-encoded, and use the HTTP or HTTPS scheme.
Generates a Dynamic Link URL components object with the minimum necessary parameters
set to generate a fully-functional Dynamic Link.
Parameters
link
Deep link to be stored in created Dynamic link. This link also called “payload” of
the Dynamic link.
domainURIPrefix
Domain URI Prefix of your App. This value must be your assigned
domain from the Firebase console. (e.g. https://xyz.page.link) The domain URI prefix must
start with a valid HTTPS scheme (https://).
Return Value
Returns an instance of FIRDynamicLinkComponents if the parameters succeed validation,
else returns nil.
Generates a Dynamic Link URL components object with the minimum necessary parameters
set to generate a fully-functional Dynamic Link.
Declaration
Swift
init?(link:URL,domainURIPrefix:String)
Parameters
link
Deep link to be stored in created Dynamic link. This link also called “payload” of
the Dynamic link.
domainURIPrefix
Domain URI Prefix of your App. This value must be your assigned
domain from the Firebase console. (e.g. https://xyz.page.link) The domain URI prefix must
start with a valid HTTPS scheme (https://).
Return Value
Returns an instance of FIRDynamicLinkComponents if the parameters succeed validation,
else returns nil.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-29 UTC."],[],[],null,["# FirebaseDynamicLinks Framework Reference\n\nDynamicLinkComponents\n=====================\n\n class DynamicLinkComponents : NSObject\n\nThe class used for Dynamic Link URL generation; supports creation of short and long\nDynamic Link URLs. Short URLs will have a domain and a randomized path; long URLs will have a\ndomain and a query that contains all of the Dynamic Link parameters.\n- `\n ``\n ``\n `\n\n ### [analyticsParameters](#/c:objc(cs)FIRDynamicLinkComponents(py)analyticsParameters)\n\n `\n ` \n Applies Analytics parameters to a generated Dynamic Link URL. \n\n #### Declaration\n\n Swift \n\n var analyticsParameters: ../Classes/DynamicLinkGoogleAnalyticsParameters.html? { get set }\n\n- `\n ``\n ``\n `\n\n ### [socialMetaTagParameters](#/c:objc(cs)FIRDynamicLinkComponents(py)socialMetaTagParameters)\n\n `\n ` \n Applies Social Meta Tag parameters to a generated Dynamic Link URL. \n\n #### Declaration\n\n Swift \n\n var socialMetaTagParameters: ../Classes/DynamicLinkSocialMetaTagParameters.html? { get set }\n\n- `\n ``\n ``\n `\n\n ### [iOSParameters](#/c:objc(cs)FIRDynamicLinkComponents(py)iOSParameters)\n\n `\n ` \n Applies iOS parameters to a generated Dynamic Link URL. \n\n #### Declaration\n\n Swift \n\n var iOSParameters: ../Classes/DynamicLinkIOSParameters.html? { get set }\n\n- `\n ``\n ``\n `\n\n ### [iTunesConnectParameters](#/c:objc(cs)FIRDynamicLinkComponents(py)iTunesConnectParameters)\n\n `\n ` \n Applies iTunes Connect parameters to a generated Dynamic Link URL. \n\n #### Declaration\n\n Swift \n\n var iTunesConnectParameters: ../Classes/DynamicLinkItunesConnectAnalyticsParameters.html? { get set }\n\n- `\n ``\n ``\n `\n\n ### [androidParameters](#/c:objc(cs)FIRDynamicLinkComponents(py)androidParameters)\n\n `\n ` \n Applies Android parameters to a generated Dynamic Link URL. \n\n #### Declaration\n\n Swift \n\n var androidParameters: ../Classes/DynamicLinkAndroidParameters.html? { get set }\n\n- `\n ``\n ``\n `\n\n ### [navigationInfoParameters](#/c:objc(cs)FIRDynamicLinkComponents(py)navigationInfoParameters)\n\n `\n ` \n Applies Navigation Info parameters to a generated Dynamic Link URL. \n\n #### Declaration\n\n Swift \n\n var navigationInfoParameters: ../Classes/DynamicLinkNavigationInfoParameters.html? { get set }\n\n- `\n ``\n ``\n `\n\n ### [otherPlatformParameters](#/c:objc(cs)FIRDynamicLinkComponents(py)otherPlatformParameters)\n\n `\n ` \n Applies Other platform parameters to a generated Dynamic Link URL. \n\n #### Declaration\n\n Swift \n\n var otherPlatformParameters: ../Classes/DynamicLinkOtherPlatformParameters.html? { get set }\n\n- `\n ``\n ``\n `\n\n ### [options](#/c:objc(cs)FIRDynamicLinkComponents(py)options)\n\n `\n ` \n Defines behavior for generating Dynamic Link URLs. \n\n #### Declaration\n\n Swift \n\n var options: ../Classes/DynamicLinkComponentsOptions.html? { get set }\n\n- `\n ``\n ``\n `\n\n ### [link](#/c:objc(cs)FIRDynamicLinkComponents(py)link)\n\n `\n ` \n The link the target app will open. You can specify any URL the app can handle, such as\n a link to the app's content, or a URL that initiates some app-specific logic such as\n crediting the user with a coupon, or displaying a specific welcome screen. This link must be\n a well-formatted URL, be properly URL-encoded, and use the HTTP or HTTPS scheme. \n\n #### Declaration\n\n Swift \n\n var link: URL { get set }\n\n- `\n ``\n ``\n `\n\n ### [domain](#/c:objc(cs)FIRDynamicLinkComponents(py)domain)\n\n `\n ` \n The Firebase project's Dynamic Links domain. You can find this value in the Dynamic\n Links section of the Firebase console.\n \u003chttps://console.firebase.google.com/\u003e \n\n #### Declaration\n\n Swift \n\n var domain: String? { get set }\n\n- `\n ``\n ``\n `\n\n ### [url](#/c:objc(cs)FIRDynamicLinkComponents(py)url)\n\n `\n ` \n A generated long Dynamic Link URL. \n\n #### Declaration\n\n Swift \n\n var url: URL? { get }\n\n- `\n ``\n ``\n `\n\n ### [+componentsWithLink:domainURIPrefix:](#/c:objc(cs)FIRDynamicLinkComponents(cm)componentsWithLink:domainURIPrefix:)\n\n `\n ` \n Generates a Dynamic Link URL components object with the minimum necessary parameters\n set to generate a fully-functional Dynamic Link. \n\n #### Parameters\n\n |-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*link*` ` | Deep link to be stored in created Dynamic link. This link also called \"payload\" of the Dynamic link. |\n | ` `*domainURIPrefix*` ` | Domain URI Prefix of your App. This value must be your assigned domain from the Firebase console. (e.g. \u003chttps://xyz.page.link\u003e) The domain URI prefix must start with a valid HTTPS scheme (https://). |\n\n #### Return Value\n\n Returns an instance of FIRDynamicLinkComponents if the parameters succeed validation,\n else returns nil.\n- `\n ``\n ``\n `\n\n ### [init(link:domainURIPrefix:)](#/c:objc(cs)FIRDynamicLinkComponents(im)initWithLink:domainURIPrefix:)\n\n `\n ` \n Generates a Dynamic Link URL components object with the minimum necessary parameters\n set to generate a fully-functional Dynamic Link. \n\n #### Declaration\n\n Swift \n\n init?(link: URL, domainURIPrefix: String)\n\n #### Parameters\n\n |-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*link*` ` | Deep link to be stored in created Dynamic link. This link also called \"payload\" of the Dynamic link. |\n | ` `*domainURIPrefix*` ` | Domain URI Prefix of your App. This value must be your assigned domain from the Firebase console. (e.g. \u003chttps://xyz.page.link\u003e) The domain URI prefix must start with a valid HTTPS scheme (https://). |\n\n #### Return Value\n\n Returns an instance of FIRDynamicLinkComponents if the parameters succeed validation,\n else returns nil.\n- `\n ``\n ``\n `\n\n ### [shortenURL(_:options:)](#/c:objc(cs)FIRDynamicLinkComponents(cm)shortenURL:options:completion:)\n\n `\n ` \n Shortens a Dynamic Link URL. This method may be used for shortening a custom URL that\n was not generated using FIRDynamicLinkComponents. \n\n #### Declaration\n\n Swift \n\n class func shortenURL(_ url: URL, options: ../Classes/DynamicLinkComponentsOptions.html?) async throws -\u003e (URL, [String])\n\n #### Parameters\n\n |--------------------|--------------------------------------------------------------------------------------------------------------------------------|\n | ` `*url*` ` | A properly-formatted long Dynamic Link URL. |\n | ` `*completion*` ` | A block to be executed upon completion of the shortening attempt. It is guaranteed to be executed once and on the main thread. |\n\n- `\n ``\n ``\n `\n\n ### [shorten()](#/c:objc(cs)FIRDynamicLinkComponents(im)shortenWithCompletion:)\n\n `\n ` \n Generates a short Dynamic Link URL using all set parameters. \n\n #### Declaration\n\n Swift \n\n func shorten() async throws -\u003e (URL, [String])\n\n #### Parameters\n\n |--------------------|--------------------------------------------------------------------------------------------------------------------------------|\n | ` `*completion*` ` | A block to be executed upon completion of the shortening attempt. It is guaranteed to be executed once and on the main thread. |"]]