1
votes
     func application(application: UIApplication,
        openURL url: NSURL,
        sourceApplication: String?,
        annotation: AnyObject?) -> Bool {
            return FBSDKApplicationDelegate.sharedInstance.application(application,
                openURL: url,
                sourceApplication: sourceApplication,
                annotation: annotation)
           }
      }

Error Message:() -> FBSDKApplicationDelegate!' does not have a member named 'application'

I have followed every step on Facebook ios SDK https://developers.facebook.com/docs/ios/getting-started/ and Parse SDK enter link description here to setup a Facebook error.

I got error message shown above. '()->FBSDKApplicationDelegate!' dose not have a member named 'application'.

This is my bridge-header.h file looks like:

#ifndef TinderC_Bridge_Header_h
#define TinderC_Bridge_Header_h

#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <ParseFacebookUtilsV4/PFFacebookUtils.h>


#endif

Thank you for your time and patient. I really appreciate your help.

Cheers

1

1 Answers

0
votes

Facebook's Documentation might be a bit out of date, since they are updating their SDK's with light speed.

The call to sharedInstance is wrong in your case, because SDK is written in Objective-C.

sharedInstance is a class method, not a property on FBSDKApplicationDelegate, so you must call the method with (). See the example below:

func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
        return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
    }

The following example works for me.