Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Initialize Facebook Core SDK for iOS using Objective C?

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

like image 642
Abdulrahman Alhayek Avatar asked Oct 17 '25 08:10

Abdulrahman Alhayek


1 Answers

Initialize FBSDK

[FBSDKApplicationDelegate.sharedInstance application:application didFinishLaunchingWithOptions:launchOptions];
like image 164
Abdulrahman Alhayek Avatar answered Oct 19 '25 23:10

Abdulrahman Alhayek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!