设置 Facebook SDK 进行后期处理会导致控制台中出现错误消息 [英] Setting up Facebook SDK for post processing leads to error messages in console

查看:25
本文介绍了设置 Facebook SDK 进行后期处理会导致控制台中出现错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对此没有明确的影响,但正处于项目的最后阶段,我正在努力注意任何警告.将以下行添加到 application(_:didFinishLaunchingWithOptions) 下的 App Delegate 时,每次在 Xcode 控制台中启动时,我都会收到来自 FB 的 3 个警告日志:

I have no clear effects from this, but am in the final phases of a project and am trying to heed any warnings. I receive 3 warning logs from FB each time I launch in the Xcode console when adding the following line to App Delegate under application(_:didFinishLaunchingWithOptions):

FBSDKCoreKit.ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)

...FBSDKLog:在 Facebook SDK 初始化之前无法启动 FBSDKGraphRequestConnection."

"...FBSDKLog: FBSDKGraphRequestConnection cannot be started before Facebook SDK initialized."

当然,如果我删除了这一行,那么如果我尝试使用 Facebook 登录后处理不会完成并且不会发生登录.所以,健全性检查:我应该忽略这些警告吗?

If I remove this line of course then if I attempt to log in with Facebook post processing does not complete and the login does not occur. So, sanity check: am I to ignore these warnings?

推荐答案

Facebook 需要一行在 AppDidLaunch 中进行后期处理,第一次应用启动时会在 SDK 初始化之前运行:https://developers.facebook.com/docs/ios/graph/.因此,当您第一次启动时,这条线没有实际意义,但无论如何 FB 很乐意阻塞您的控制台.如果您删除此行,FB 将无法在应用程序中正确处理登录,因此我们将不得不忍受这种毫无意义的警告".

Facebook requires a line for post-processing in AppDidLaunch, which the first time the app launches will run prior to the SDK being initialized: https://developers.facebook.com/docs/ios/graph/. The line is therefore moot when you first launch, but FB is happy to clog your console anyway. If you remove this line FB will be unable to process a login appropriately in an app, so we will have to live with this meaningless "warning."

这篇关于设置 Facebook SDK 进行后期处理会导致控制台中出现错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆