iosfacebookparse-platformfacebook-sdk-4.0parsefacebookutils

Facebook SDK v4 & Parse (Swift)


I am trying to work ParseFacebookUtilsv4 & FacebookSDK v4.. After many trials, I've managed to reduce the errors to 1.

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

    Parse.setApplicationId("###",
        clientKey: "###")

    PFFacebookUtils.initializeFacebookWithLaunchOptions(launchOptions)

}

In this part, which is exactly copied from Parse's iOS Docs - Facebook Setup (that is updated yesterday for FBSDKv4), I am getting an error:

'PFFacebookUtils.Type' does not have a member named 'initializeFacebookWithLaunchOptions'

When I check the full documentation of ParseFacebookUtilsv4 which says ~ Warning: This class supports official Facebook iOS SDK v4.0+ and is available only on iOS. ~, I saw that there isn't any class called 'initializeFacebookWithLaunchOptions'; instead there is 'initializeFacebookWithApplicationLaunchOptions:'

However, when I change my AppDelegate.swift / didFinishLaunchingWithOptions part as:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

    Parse.setApplicationId("###",
        clientKey: "###")

    PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions)

}

...I get an error saying 'Missing return in a function expected to return 'Bool'. Then I tried to add both

 return true /* AND */ return false // at the end of the function; 

...I get 9 crashes such as: https://i.sstatic.net/o989R.png

I am completely stuck and don't know how to fix this.


Solution

  • Based on your error logs, I think either you're missing dependencies, or you have dependencies added here but you haven't included them in your project.

    I think your Facebook SDK isn't included in the build target, since the symbols that are missing have FB prefixes.