Initialize Facebook Core SDK for iOS using Objective C?

Viewed 350

I want to add the Facebook Events tracking to my app, but as it appears Facebook SDK documentation only provides the code in Swift language:

class AppDelegate: UIResponder, UIApplicationDelegate {    
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {          
    ApplicationDelegate.shared.application(
        application,
        didFinishLaunchingWithOptions: launchOptions
    )

    return true
}

As I read I should use FBSDKApplicationDelegate but I'm not sure how.

Thanks

1 Answers

Initialize FBSDK

[FBSDKApplicationDelegate.sharedInstance application:application didFinishLaunchingWithOptions:launchOptions];
Related