FIRDynamicLinkComponents


@interface FIRDynamicLinkComponents : 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.

  • Applies Analytics parameters to a generated Dynamic Link URL.

    Declaration

    Swift

    var analyticsParameters: DynamicLinkGoogleAnalyticsParameters? { get set }

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        FIRDynamicLinkGoogleAnalyticsParameters *analyticsParameters;
  • Applies Social Meta Tag parameters to a generated Dynamic Link URL.

    Declaration

    Swift

    var socialMetaTagParameters: DynamicLinkSocialMetaTagParameters? { get set }

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        FIRDynamicLinkSocialMetaTagParameters *socialMetaTagParameters;
  • Applies iOS parameters to a generated Dynamic Link URL.

    Declaration

    Swift

    var iOSParameters: DynamicLinkIOSParameters? { get set }

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        FIRDynamicLinkIOSParameters *iOSParameters;
  • Applies iTunes Connect parameters to a generated Dynamic Link URL.

    Declaration

    Swift

    var iTunesConnectParameters: DynamicLinkItunesConnectAnalyticsParameters? { get set }

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        FIRDynamicLinkItunesConnectAnalyticsParameters *iTunesConnectParameters;
  • Applies Android parameters to a generated Dynamic Link URL.

    Declaration

    Swift

    var androidParameters: DynamicLinkAndroidParameters? { get set }

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        FIRDynamicLinkAndroidParameters *androidParameters;
  • Applies Navigation Info parameters to a generated Dynamic Link URL.

    Declaration

    Swift

    var navigationInfoParameters: DynamicLinkNavigationInfoParameters? { get set }

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        FIRDynamicLinkNavigationInfoParameters *navigationInfoParameters;
  • Applies Other platform parameters to a generated Dynamic Link URL.

    Declaration

    Swift

    var otherPlatformParameters: DynamicLinkOtherPlatformParameters? { get set }

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        FIRDynamicLinkOtherPlatformParameters *otherPlatformParameters;
  • Defines behavior for generating Dynamic Link URLs.

    Declaration

    Swift

    var options: DynamicLinkComponentsOptions? { get set }

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        FIRDynamicLinkComponentsOptions *options;
  • 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.

    Declaration

    Swift

    var link: URL { get set }

    Objective-C

    @property (assign, readwrite, nonatomic) NSURL *_Nonnull link;
  • The Firebase project’s Dynamic Links domain. You can find this value in the Dynamic Links section of the Firebase console. https://console.firebase.google.com/

    Declaration

    Swift

    var domain: String? { get set }

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *domain;
  • url

    A generated long Dynamic Link URL.

    Declaration

    Swift

    var url: URL? { get }

    Objective-C

    @property (readonly, nonatomic, nullable) NSURL *url;
  • Generates a Dynamic Link URL components object with the minimum necessary parameters set to generate a fully-functional Dynamic Link.

    Declaration

    Objective-C

    + (nonnull instancetype)componentsWithLink:(nonnull NSURL *)link
                                        domain:(nonnull NSString *)domain;

    Parameters

    link

    Deep link to be stored in created Dynamic link. This link also called payload of the Dynamic link.

    domain

    Domain of your App. This value must be equal to your assigned domain from Firebase Console.

  • 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, domain: String)

    Objective-C

    - (nonnull instancetype)initWithLink:(nonnull NSURL *)link
                                  domain:(nonnull NSString *)domain;

    Parameters

    link

    Deep link to be stored in created Dynamic link. This link also called payload of the Dynamic link.

    domain

    Domain of your App. This value must be equal to your assigned domain from Firebase Console.

  • Shortens a Dynamic Link URL. This method may be used for shortening a custom URL that was not generated using FIRDynamicLinkComponents.

    Declaration

    Swift

    class func shortenURL(_ url: URL, options: DynamicLinkComponentsOptions?, completion: @escaping DynamicLinkShortenerCompletion)

    Objective-C

    + (void)shortenURL:(nonnull NSURL *)url
               options:(FIRDynamicLinkComponentsOptions *_Nullable)options
            completion:(nonnull FIRDynamicLinkShortenerCompletion)completion;

    Parameters

    url

    A properly-formatted long Dynamic Link URL.

    completion

    A block to be executed upon completion of the shortening attempt. It is guaranteed to be executed once and on the main thread.

  • Generates a short Dynamic Link URL using all set parameters.

    Declaration

    Swift

    func shorten(completion: @escaping DynamicLinkShortenerCompletion)

    Objective-C

    - (void)shortenWithCompletion:
        (nonnull FIRDynamicLinkShortenerCompletion)completion;

    Parameters

    completion

    A block to be executed upon completion of the shortening attempt. It is guaranteed to be executed once and on the main thread.