Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting an error in FBSDKApplicationDelegate class

I'm getting an error when I build my xCode 7.3.1 project.

/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.h:77:35: No type or protocol named 'UIApplicationOpenURLOptionsKey'

Problem func like this:

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options;

Need your help! Thx..

like image 824
anilst Avatar asked Oct 23 '16 08:10

anilst


1 Answers

The Latest FBSDKCoreKit does'nt work with Xcode 7.3. You should use XCode 8 or older versions of Facebook framework.

 - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options

has been replaced in XCode 8 as

 - (BOOL)application:(UIApplication *)application
        openURL:(NSURL *)url
        options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options;

Try this facebook SDK instead

https://origincache.facebook.com/developers/resources/?id=FacebookSDKs-iOS-4.14.0.zip

For more information on changes from iOS 9 to 10 , go to this link https://developer.apple.com/library/content/releasenotes/General/iOS10APIDiffs/Objective-C/UIKit.html

like image 174
shinoys222 Avatar answered Sep 25 '22 22:09

shinoys222