设置Facebook SDK进行后期处理会导致控制台中出现错误消息 [英] Setting up Facebook SDK for post processing leads to error messages in console
问题描述
对此我没有明显的影响,但是我处于项目的最后阶段,并且正在尝试注意任何警告.每当在 application(_:didFinishLaunchingWithOptions)
:
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屋!