Swift SDK Version

SDKApplicationDelegate

publicfinalclassSDKApplicationDelegate
The SDKApplicationDelegate is designed to post process the results from Facebook Login or Facebook Dialogs (or any action that requires switching over to the native Facebook app or Safari).
The methods in this class are designed to mirror those in UIApplicationDelegate, and you should call them in the respective methods in your AppDelegate implementation.
  • Returns the singleton instance of an application delegate.

    Declaration

    Swift
    publicstaticletshared:SDKApplicationDelegate
  • Call this function from the UIApplicationDelegate.application(application:didFinishLaunchingWithOptions:) function of the AppDelegate of your app It should be invoked for the proper initialization of the Facebook SDK.

    Declaration

    Swift
    @discardableResultpublicfuncapplication(_application:UIApplication,didFinishLaunchingWithOptionslaunchOptions:[UIApplicationLaunchOptionsKey:Any]?=nil)->Bool

    Parameters

    application
    The application as passed to UIApplicationDelegate.
    launchOptions
    The launchOptions as passed to UIApplicationDelegate.

    Return Value

    true if the url contained in the launchOptions was intended for the Facebook SDK, otherwise - false.
  • Call this function from the UIApplicationDelegate.application(application:openURL:sourceApplication:annotation:) function of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction with the native Facebook app or Safari as part of SSO authorization flow or Facebook dialogs.

    Declaration

    Swift
    @available(iOS, deprecated: 9.0, message: "Please use application(_:open:options:﹚.")@discardableResultpublicfuncapplication(_application:UIApplication,openurl:URL,sourceApplication:String?,annotation:Any)->Bool

    Parameters

    application
    The application as passed to UIApplicationDelegate.
    url
    The URL as passed to UIApplicationDelegate.
    sourceApplication
    The sourceApplication as passed to UIApplicationDelegate.
    annotation
    The annotation as passed to UIApplicationDelegate.

    Return Value

    true if the url was intended for the Facebook SDK, otherwise - false.
  • Call this function from the UIApplicationDelegate.application(app:openURL:options:) function of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction with the native Facebook app or Safari as part of SSO authorization flow or Facebook dialogs.

    Declaration

    Swift
    @available(iOS 9.0, *)@discardableResultpublicfuncapplication(_app:UIApplication,openurl:URL,options:[UIApplicationOpenURLOptionsKey:Any]=[:])->Bool

    Parameters

    app
    The application as passed to UIApplicationDelegate.
    url
    The URL as passed to UIApplicationDelegate.
    options
    The options as passed to UIApplicationDelegate.

    Return Value

    true if the url was intended for the Facebook SDK, otherwise - false.