Facebook SDK ios v4.4.0 made FinishLaunchingWithOptions

I implemented the Facebook SDK in my iOS application as recommended by Facebook and in my AppDelegate, which I installed:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ // more code return [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions]; } 

Now I also have handover implemented in my application, and - (BOOL) application:(UIApplication *)application willContinueUserActivityWithType:(NSString *)userActivityType will never be called when the application starts from scratch because FBSDKApplicationDelegate sharedInstance returns false.

So my question is: are there any side effects if I don't return the result of [FBSDKApplicationDelegate sharedInstance]application:didFinishLaunchingWithOptions and [FBSDKApplicationDelegate sharedInstance]application:didFinishLaunchingWithOptions my custom result back? For instance:

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ // more code [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions]; return YES; } 
+5
source share
1 answer

The short answer is NO.


[FBSDKApplicationDelegate application: didFinishLaunchingWithOptions:] method should only be used to properly use the Facebook SDK from the [UIApplicationDelegate application:didFinishLaunchingWithOptions:] AppDelegate for your application.

This method returns YES if the URL is for the Facebook SDK, NO if not.


In the last Facebook, which started working with documents , they mention it

To publish the results from Facebook Login or Facebook Dialogs (or any actions that require switching to the native Facebook or Safari application), you need to connect your AppDelegate to FBSDKApplicationDelegate . In the AppDelegate.m application, add:

 // AppDelegate.m #import <FBSDKCoreKit/FBSDKCoreKit.h> - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions]; return YES; } - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation ]; } 
+3
source

All Articles