gpt4 book ai didi

ios - Facebook SDK 集成 - 返回

转载 作者:行者123 更新时间:2023-11-28 19:50:31 25 4
gpt4 key购买 nike

我无法将 FB SDK 集成到我的项目中,因为我无法从他们的快速入门指南中添加这些代码行:

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

因为我那里已经有了一个return:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self LoginToGameCenter_iOS_7_forth_way];
return YES;
}

据我所知,不可能有 2 个返回。我应该怎么办?那么我该如何设置 FB SDK?

最佳答案

你想要这个:

- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self LoginToGameCenter_iOS_7_forth_way];
return [[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
}

因为您将您的应用程序向下传递到 FB SDK 中,它有自己的 -didFinishLaunchignWithOptions 方法——它返回 BOOL 并返回到您的主应用程序委托(delegate),反过来又返回 BOOL

关于ios - Facebook SDK 集成 - 返回,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29497045/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com