简体   繁体   English

未声明的标识符'FBAppCall''FBDialogs'

[英]undeclared identifier 'FBAppCall' 'FBDialogs'

I'm recently trying to update the Facebook SDK on our application. 我最近正在尝试在我们的应用程序上更新Facebook SDK。 I had no worries following the steps fom the Upgrade guide by Facebook. 按照Facebook的《 升级指南》中的步骤操作,我无后顾之忧。

I was able to compile without issues. 我能够毫无问题地进行编译。

However, when I quit XCode, reopen my project and try to recompile I get an error about ' FBAppCall ' (undeclared identifier). 但是,当我退出XCode时,重新打开我的项目并尝试重新编译时,出现关于' FBAppCall '的错误(未声明的标识符)。 All others classes from the SDK are working except this one and ' FBDialogs '. SDK中的所有其他类均在起作用,除了这一类和“ FBDialogs ”。

I am able to solve those errors by deleting the Facebook framework and adding it again. 我可以通过删除Facebook框架并再次添加来解决这些错误。 But I must do it every time I quit XCode. 但是我每次退出XCode时都必须这样做。

I've tried to check or uncheck " Copy items into destination group's folder (if needed) " with no luck. 我试图检查或取消选中“ 将项目复制到目标组的文件夹(如果需要) ”,但是没有运气。 Also tried older versions of Facebook SDK but it didn't changed anything. 还尝试了旧版本的Facebook SDK,但没有做任何更改。 Also tried to clear all the Facebook SDK references from the project.pbxproj before readding the frameworks, in vain. 还试图徒劳地读取框架之前从project.pbxproj清除所有Facebook SDK参考。

Thank you for helping me with this annoying issue.. 感谢您为我解决这个烦人的问题。

Note: Already did all the configuration Facebook SDK is requiring in the Getting Started page. 注意:Facebook SDK已在“ 入门”页面上进行了所有必需的配置。

Finally found the solution. 终于找到了解决方案。

Since I was upgrading from an older Facebook SDK, I had to delete the older FacebookSDK.framework file from $(PROJECT_DIR)/Frameworks and then re-add it in XCode. 由于我是从较旧的Facebook SDK升级,因此我不得不从$(PROJECT_DIR)/ Frameworks中删除较旧的FacebookSDK.framework文件,然后将其重新添加到XCode中。

did you add 你加了吗

#import <FacebookSDK/FacebookSDK.h>

in your AppDelegate.m file? 在您的AppDelegate.m文件中?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM