iOS SDK Version

FBSDKAppLinkNavigation

@interfaceFBSDKAppLinkNavigation:NSObject
Represents a pending request to navigate to an App Link. Most developers will simply use navigateToURLInBackground: to open a URL, but developers can build custom requests with additional navigation and app data attached to them by creating FBSDKAppLinkNavigations themselves.
  • Unavailable
    Undocumented

    Declaration

    Objective-C
    -(instancetype)initNS_UNAVAILABLE;
  • Unavailable
    Undocumented

    Declaration

    Objective-C
    +(instancetype)newNS_UNAVAILABLE;
  • The default resolver to be used for App Link resolution. If the developer has not set one explicitly, a basic, built-in FBSDKWebViewAppLinkResolver will be used.

    Declaration

    Objective-C
    @property(class,nonatomic,strong,readwrite)NS_SWIFT_NAME(default)id<FBSDKAppLinkResolving>defaultResolver;
    Swift
    classvar`default`:AppLinkResolving{getset}
  • The extras for the AppLinkNavigation. This will generally contain application-specific data that should be passed along with the request, such as advertiser or affiliate IDs or other such metadata relevant on this device.

    Declaration

    Objective-C
    @property(nonatomic,copy,readonly)NSDictionary<NSString*,id>*_Nonnullextras;
    Swift
    varextras:[String:Any]{get}
  • The al_applink_data for the AppLinkNavigation. This will generally contain data common to navigation attempts such as back-links, user agents, and other information that may be used in routing and handling an App Link request.

    Declaration

    Objective-C
    @property(nonatomic,copy,readonly)NSDictionary<NSString*,id>*_NonnullappLinkData;
    Swift
    varappLinkData:[String:Any]{get}
  • The AppLink to navigate to

    Declaration

    Objective-C
    @property(nonatomic,strong,readonly)FBSDKAppLink*_NonnullappLink;
    Swift
    varappLink:AppLink{get}
  • Return navigation type for current instance. No-side-effect version of navigate:

    Declaration

    Objective-C
    @property(nonatomic,readonly)FBSDKAppLinkNavigationTypenavigationType;
    Swift
    varnavigationType:AppLinkNavigation.`Type`{get}
  • Creates an AppLinkNavigation with the given link, extras, and App Link data

    Declaration

    Objective-C
    +(nonnullinstancetype)navigationWithAppLink:(nonnullFBSDKAppLink*)appLinkextras:(nonnullNSDictionary<NSString*,id>*)extrasappLinkData:(nonnullNSDictionary<NSString*,id>*)appLinkData;
    Swift
    convenienceinit(appLink:AppLink,extras:[String:Any],appLinkData:[String:Any])
  • Creates an NSDictionary with the correct format for iOS callback URLs, to be used as ‘appLinkData’ argument in the call to navigationWithAppLink:extras:appLinkData:

    Declaration

    Objective-C
    +(nonnullNSDictionary<NSString*,NSDictionary<NSString*,NSString*>*>*)callbackAppLinkDataForAppWithName:(nonnullNSString*)appNameurl:(nonnullNSString*)url;
    Swift
    classfunccallbackAppLinkData(forAppappName:String,url:String)->[String:[String:String]]
  • Performs the navigation

    Declaration

    Objective-C
    -(FBSDKAppLinkNavigationType)navigate:(NSError*_Nullable*_Nullable)error;
    Swift
    funcnavigate()throws->AppLinkNavigation.`Type`
  • Returns a FBSDKAppLink for the given URL

    Declaration

    Objective-C
    +(void)resolveAppLink:(nonnullNSURL*)destinationhandler:(nonnullFBSDKAppLinkBlock)handler;
    Swift
    classfuncresolveAppLink(_destination:URL,handler:@escapingAppLinkBlock)
  • Returns a FBSDKAppLink for the given URL using the given App Link resolution strategy

    Declaration

    Objective-C
    +(void)resolveAppLink:(nonnullNSURL*)destinationresolver:(nonnullid<FBSDKAppLinkResolving>)resolverhandler:(nonnullFBSDKAppLinkBlock)handler;
    Swift
    classfuncresolveAppLink(_destination:URL,resolver:AppLinkResolving,handler:@escapingAppLinkBlock)
  • Navigates to a FBSDKAppLink and returns whether it opened in-app or in-browser

    Declaration

    Objective-C
    +(FBSDKAppLinkNavigationType)navigateToAppLink:(nonnullFBSDKAppLink*)linkerror:(NSError*_Nullable*_Nullable)error;
    Swift
    classfuncnavigate(tolink:AppLink)throws->AppLinkNavigation.`Type`
  • Returns a FBSDKAppLinkNavigationType based on a FBSDKAppLink. It’s essentially a no-side-effect version of navigateToAppLink:error:, allowing apps to determine flow based on the link type (e.g. open an internal web view instead of going straight to the browser for regular links.)

    Declaration

    Objective-C
    +(FBSDKAppLinkNavigationType)navigationTypeForLink:(nonnullFBSDKAppLink*)link;
    Swift
    classfuncnavigationType(forlink:AppLink)->AppLinkNavigation.`Type`
  • Navigates to a URL (an asynchronous action) and returns a FBSDKNavigationType

    Declaration

    Objective-C
    +(void)navigateToURL:(nonnullNSURL*)destinationhandler:(nonnullFBSDKAppLinkNavigationBlock)handler;
    Swift
    classfuncnavigate(todestination:URL,handler:@escapingAppLinkNavigationBlock)
  • Navigates to a URL (an asynchronous action) using the given App Link resolution strategy and returns a FBSDKNavigationType

    Declaration

    Objective-C
    +(void)navigateToURL:(nonnullNSURL*)destinationresolver:(nonnullid<FBSDKAppLinkResolving>)resolverhandler:(nonnullFBSDKAppLinkNavigationBlock)handler;
    Swift
    classfuncnavigate(todestination:URL,resolver:AppLinkResolving,handler:@escapingAppLinkNavigationBlock)